Raises the ChangePassword.ChangingPassword event before the user's password is changed by the membership provider.
- e
- A System.ComponentModel.CancelEventArgs object containing the event data.
The ChangePassword.OnChangingPassword(LoginCancelEventArgs) method is called before the membership provider specified in the ChangePassword.MembershipProvider property is called to change the user's password.
Use the ChangePassword.OnChangingPassword(LoginCancelEventArgs) method to perform any processing that is necessary before changing the password, such as checking the new password to make sure it is not in a list of common passwords.
The ChangePassword.OnChangingPassword(LoginCancelEventArgs) method can cancel the ChangePassword.ChangingPassword event by setting the System.ComponentModel.CancelEventArgs.Cancel property of the System.ComponentModel.CancelEventArgs object passed as the e parameter to true.
Raising an event invokes the event handler through a delegate. For more information, see Server Event Handling in ASP.NET Web Pages.
The ChangePassword.OnChangingPassword(LoginCancelEventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.