Ravi
Ravi

Reputation: 1313

Forgot password using ASP.Net membership provider?

Is it possible to implement a "forgot password" using ASP.Net membership provider?

Any sample link is appreciated.

Thanks

Upvotes: 4

Views: 7609

Answers (2)

ntombela
ntombela

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

this. __curious_geek
this. __curious_geek

Reputation: 43217

Use PasswordRecovery control or You can call GetPassword() or ResetPassword() methods on your membership provider.

Upvotes: 4

Related Questions