MembershipProvider.OnValidatingPassword(ValidatePasswordEventArgs) 方法

定义

如果定义了事件处理程序,则引发 ValidatingPassword 事件。Raises the ValidatingPassword event if an event handler has been defined.

protected:
 virtual void OnValidatingPassword(System::Web::Security::ValidatePasswordEventArgs ^ e);
protected virtual void OnValidatingPassword (System.Web.Security.ValidatePasswordEventArgs e);
abstract member OnValidatingPassword : System.Web.Security.ValidatePasswordEventArgs -> unit
override this.OnValidatingPassword : System.Web.Security.ValidatePasswordEventArgs -> unit
Protected Overridable Sub OnValidatingPassword (e As ValidatePasswordEventArgs)

参数

e
ValidatePasswordEventArgs

传递给 ValidatePasswordEventArgs 事件处理程序的 ValidatingPasswordThe ValidatePasswordEventArgs to pass to the ValidatingPassword event handler.

示例

有关MembershipProvider实现的示例,请参阅实现配置文件提供程序For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

注解

CreateUser ResetPassword ChangePassword如果已指定,则在、 ValidatingPassword OnValidatingPassword 和方法中使用虚方法MembershipValidatePasswordEventHandler来引发事件。The OnValidatingPassword virtual method is used during the CreateUser, ChangePassword, and ResetPassword methods to raise the ValidatingPassword event if a MembershipValidatePasswordEventHandler has been specified. 参数用于将ValidatePasswordEventArgs对象传递到MembershipValidatePasswordEventHandler事件处理程序。 eThe e parameter is used to pass a ValidatePasswordEventArgs object to the MembershipValidatePasswordEventHandler event handler. 事件完成后,可以检查e作为参数提供的ValidatePasswordEventArgs对象的属性,以确定是否应取消当前Exception操作以及是否应在ValidatingPassword FailureInformation应引发属性。When the ValidatingPassword event has completed, the properties of the ValidatePasswordEventArgs object supplied as the e parameter can be examined to determine whether the current action should be canceled and if a particular Exception, stored in the FailureInformation property, should be thrown.

适用于

另请参阅