ASP.NET login and password recovery control
-
Hi all, I am trying to create login and password recovery page ASP.NET2.0. I have user login and password stored in table in the database. I am using Login and password recovery controls. I am handling "Authenticate" event of login control. During the password recovery, I generate new password and send email to the user at specified address. To handle this which event of passwordprecovery should be handled? I have handled SendingEmail event, but when I checked in debug, I found that control does not go there on ButtonSubmit click. Can anyone suggest me, how can I do this. If someone has demo on this, that will be really helpful. Thanks a lot.
-
Hi all, I am trying to create login and password recovery page ASP.NET2.0. I have user login and password stored in table in the database. I am using Login and password recovery controls. I am handling "Authenticate" event of login control. During the password recovery, I generate new password and send email to the user at specified address. To handle this which event of passwordprecovery should be handled? I have handled SendingEmail event, but when I checked in debug, I found that control does not go there on ButtonSubmit click. Can anyone suggest me, how can I do this. If someone has demo on this, that will be really helpful. Thanks a lot.
If you want to see the
SendingEmail
event working, you need to make sure that the you provider the Membership provider for the application, also the user is existing in the system. Otherwise, you need to look at theUserLookupError
. If you want to control to generate the password on your own, you can provider your custom membership provider, or create an event handler for theVerifyingUser
event. In the handler, you basically do a checking on provided username, reset the password, send an email if necessary, then remember to set theCancel
property totrue
.