System.Web.UI.WebControls.ChangePassword.OnChangePasswordError Method

Raises the ChangePassword.ChangePasswordError event when the user's password is not changed.

Syntax

protected virtual void OnChangePasswordError (EventArgs e)

Parameters

e
An EventArgs object that contains the event data.

Remarks

The ChangePassword.OnChangePasswordError(EventArgs) method is called when the membership provider specified in the ChangePassword.MembershipProvider property encounters an error while attempting to change the user's password. The specified System.Web.Security.MembershipProvider object does not indicate the reason why changing the password failed, only that the password was not changed.

Use the ChangePassword.OnChangePasswordError(EventArgs) method to perform a custom action when the user's password is not changed.

Raising an event invokes the event handler through a delegate. For more information, see Server Event Handling in ASP.NET Web Pages.

The ChangePassword.OnChangePasswordError(EventArgs) 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.

Requirements

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