Reputation: 1313
Is it possible to implement a "forgot password" using ASP.Net membership provider?
Any sample link is appreciated.
Thanks
Upvotes: 4
Views: 7609
Reputation: 1388
The best solution I've seen so far is to reset it as follows:
MemberShipUser user = MemberShip.GetUset("someUserName");
user.ChangePassword(user.ResetPassword(), "new-password-word");
This is very handy especially if your passwords are hashed.
Upvotes: 4
Reputation: 43217
Use PasswordRecovery control or You can call GetPassword() or ResetPassword() methods on your membership provider.
Upvotes: 4