Friday, March 16, 2012

How to set new password without old one in ASP.NET Membership?

Reset password, then use reseted password as old password to set new one.

                 MembershipUser user = Membership.GetUser(username);
                string oldpassword = user.ResetPassword();
                user.ChangePassword(oldpassword, "newpassword");


No comments:

Post a Comment