I am having a problem sending email from the passwordrecovery control. I am not able to fix the email settings at this time and was wondering if there was a way to show the newly generated password in a label on the page and bypass email? I know this is
less secure, but it is my only option at the moment. Any help would be great.
Refer this article:
make a new page
add one textbox for user name and some element for user help
add one asp:button with text "Get New Password"
on button click write the code to generate the random password and show this password to user
1- Get User By User Name from Membership
2- Call ResetPassword Method
3- Show the new password to user
Simple Example Code:
String newPassword = "";
MembershipUser user = Membership.GetUser(UserName.Text);
newPassword = user.ResetPassword();
lblNewPassword.text = newPassword;