Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)
type MembershipValidatePasswordEventHandler = delegate of sender:Object * e:ValidatePasswordEventArgs -> unit
The ValidatingPassword event for a membership provider. The ValidatingPassword event is raised when the CreateUser method, the ChangePassword method, or the ResetPassword method of a membership provider is called.delegate is defined for the
You can use the ValidatingPassword event to validate password formats and values for membership users.
If you cancel the current action by setting the Cancel property to true, you can set the FailureInformation property of the supplied ValidatePasswordEventArgs to an exception that describes the reason for the password-validation failure. The calling method will throw the exception that the FailureInformation property is set to. If the FailureInformation property is null, the caller will throw a generic password-validation failure exception.
Legacy Code Example
The following code example shows a ValidatingPassword event that validates the format of the password for the user, and then cancels the action if the password does not match the required format.Code snippet is not found. Confirm that the code snippet name 'System.Web.Security.Membership' is correct.
Available since 2.0