ChangePassword Constructor ()
Initializes a new instance of the ChangePassword class.
Assembly: System.Web (in System.Web.dll)
The following code example shows how to set the NewPasswordRegularExpression property to define a regular expression that checks passwords to ensure that they meet the following criteria:
Are greater than six characters.
Contain at least one digit.
Contain at least one special (non-alphanumeric) character.
The password requirements contained in the PasswordHintText property are displayed to the user.
If the password entered by the user does not meet the criteria, the text contained in the NewPasswordRegularExpressionErrorMessage property is displayed to the user. If a new password is not entered, the text contained in the NewPasswordRequiredErrorMessage property is displayed to the user.
Note |
|---|
The new password must meet the minimum requirements set by the in the MinRequiredPasswordLength, MinRequiredNonAlphanumericCharacters, and PasswordStrengthRegularExpression properties. If the password does not meet these requirements, the ChangePasswordError event is raised. |
Available since 2.0
CreateUserWizard
PasswordRecovery
Login
DeleteUser
ChangePassword Class
System.Web.UI.WebControls Namespace
ASP.NET Login Controls Overview
Customizing the Appearance of ASP.NET Login Controls
ASP.NET Web Server Controls Templates
How to: Display Different Information to Anonymous and Logged In Users
Web Site Administration Tool Security Tab
Securing Login Controls
Basic Security Practices for Web Applications
Securing Membership
.jpeg?cs-save-lang=1&cs-lang=fsharp)