FieldTemplateUserControl.SetUpValidator 方法

定义

为要使用的字段模板设置 DynamicValidator

重载

SetUpValidator(BaseValidator)

对所有验证控件设置 ValidationGroup

SetUpValidator(BaseValidator, MetaColumn)

使用此类型验证程序和要验证的列设置 DynamicValidator

SetUpValidator(BaseValidator)

对所有验证控件设置 ValidationGroup

protected:
 virtual void SetUpValidator(System::Web::UI::WebControls::BaseValidator ^ validator);
protected virtual void SetUpValidator (System.Web.UI.WebControls.BaseValidator validator);
abstract member SetUpValidator : System.Web.UI.WebControls.BaseValidator -> unit
override this.SetUpValidator : System.Web.UI.WebControls.BaseValidator -> unit
Protected Overridable Sub SetUpValidator (validator As BaseValidator)

参数

validator
BaseValidator

要设置的验证控件。

注解

此方法对特定验证控件(如 )执行其他逻辑, RangeValidator 并在所有验证控件上设置 ValidationGroup

适用于

SetUpValidator(BaseValidator, MetaColumn)

使用此类型验证程序和要验证的列设置 DynamicValidator

protected:
 virtual void SetUpValidator(System::Web::UI::WebControls::BaseValidator ^ validator, System::Web::DynamicData::MetaColumn ^ column);
protected virtual void SetUpValidator (System.Web.UI.WebControls.BaseValidator validator, System.Web.DynamicData.MetaColumn column);
abstract member SetUpValidator : System.Web.UI.WebControls.BaseValidator * System.Web.DynamicData.MetaColumn -> unit
override this.SetUpValidator : System.Web.UI.WebControls.BaseValidator * System.Web.DynamicData.MetaColumn -> unit
Protected Overridable Sub SetUpValidator (validator As BaseValidator, column As MetaColumn)

参数

validator
BaseValidator

要设置的验证程序类型。

column
MetaColumn

要为其设置验证程序的列。

注解

此方法用于在所有验证程序上设置 ValidationGroup

它在此方法中为特定验证程序类型执行其他逻辑。 例如,如果范围值退出数据模型中,此方法将设置 RangeValidator

适用于