I have a webpage that a user logs into to. Now I want to provide the ability for a user to change their password using the ChangePasswork Control. The control does work as described here ChangePasswork Control for non-authenticated users. But I want to the behavior for authenticated users.
I'm fairly new to asp so this could be a simple question but exactly开发者_运维百科 how do you "authenticate" a user?
According to the docs, the control works for both authenticated and non-authenticated users. Changing a users password programmatically is very straight forward. Take a look at the MembershipProvider and MembershipUser classes. You can validate a user using: MembershipProvider.ValidateUser To authenticate them use: FormsAuthentication.SetAuthCookie MembershipUser has a method: ChangePassword. If you are new to all this, read introduction to membership
精彩评论