I came accross the code :
MembershipUser u = Membership.GetUser();
u.ChangePassword(u.ResetPassword(), "Password"); //where will I get the "Password" from
I dont understand how I will
get the client password as the user has forgotten his old password.
I want to add a reset functionality which would generate a random password and
send an email to the particular client which will have the userid and the random generated password. After he/she would be able to change the password.
Best Answer
You can generate a random password like this using the Membership GeneratePassword method
If you need to create your own salt and hash a new password, here is an implementation which does much the same as the membership code: