Shaitan00
08-09-2008, 06:10 PM
I'm using the <asp:login> control to perform user authentication on my web page, however I am not using the ASP membership stuff, instead I opted to customize the login behavior seeing as I use a Database for authentication purposes
[Default.aspx]
<asp:login id="Login1" OnAuthenticate="OnAuthenticate" runat="server">
...
</asp:login>
[Default.aspx.cs]
// Login Authentication Event //
protected void OnAuthenticate(object sender, AuthenticateEventArgs e)
{
bool Authenticated = false;
Authenticated = AuthenticationMethod(Login1.UserName, Login1.Password);
e.Authenticated = Authenticated;
}
Where "AuthenticationMethod" is my custom authentication function that accesses my database and checks to ensure the username/password is valid.
Now I wanted to implement handling to allow the user to change his password, so similarily I decided to use the <asp:ChangePassword> control, however I can't see to find out how to overide the basic functionality which uses ASP membership and instead allow myself to perform the changes to my database instead.
Essentially - I just wanted to use the GUI (html layout) and some of the password validation functionality within <asp:ChangePassword> control so not to have to do it all manually ...
Is there anyway to do this? Or am I going about this the wrong way?
Thanks,
[Default.aspx]
<asp:login id="Login1" OnAuthenticate="OnAuthenticate" runat="server">
...
</asp:login>
[Default.aspx.cs]
// Login Authentication Event //
protected void OnAuthenticate(object sender, AuthenticateEventArgs e)
{
bool Authenticated = false;
Authenticated = AuthenticationMethod(Login1.UserName, Login1.Password);
e.Authenticated = Authenticated;
}
Where "AuthenticationMethod" is my custom authentication function that accesses my database and checks to ensure the username/password is valid.
Now I wanted to implement handling to allow the user to change his password, so similarily I decided to use the <asp:ChangePassword> control, however I can't see to find out how to overide the basic functionality which uses ASP membership and instead allow myself to perform the changes to my database instead.
Essentially - I just wanted to use the GUI (html layout) and some of the password validation functionality within <asp:ChangePassword> control so not to have to do it all manually ...
Is there anyway to do this? Or am I going about this the wrong way?
Thanks,