开发者

Authenticate user and using the ChangePassword Control

开发者 https://www.devze.com 2022-12-26 20:37 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号