System.Web.UI.WebControls.ChangePassword.NewPassword Property

Gets the new password entered by the user.

Syntax

[System.Web.UI.Themeable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual string NewPassword { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The ChangePassword.NewPassword property contains the new password entered by the user.

You can use the ChangePassword.NewPasswordRegularExpression property to define the requirements for the new password. This regular expression is used to enforce password rules on the client side. The ChangePassword.NewPasswordRegularExpression is not related to the password enforcement that can be configured at the data store level. The password must meet the minimum requirements set by the membership provider in the System.Web.Security.Membership.MinRequiredPasswordLength, System.Web.Security.Membership.MinRequiredNonAlphanumericCharacters, and System.Web.Security.Membership.PasswordStrengthRegularExpression properties. If the password does not meet these requirements, the ChangePassword.ChangePasswordError event is raised.

Note:

Transmitting passwords over HTTP is a potential security threat. HTTP transmissions can be viewed or compromised by malicious users. To improve security when using login controls, you should use HTTPS protocol with secure sockets layer (SSL) encryption to ensure that the user's password cannot be read during postback. For more information, see Securing Login Controls.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0