CompareValidator.Type 属性

定义

获取或设置要比较的两个值的数据类型。 默认值为 string。 此 API 已过时。 有关如何开发 ASP.NET 移动应用程序的信息,请参阅 Mobile Apps &具有 ASP.NET 的网站。

public:
 property System::Web::UI::WebControls::ValidationDataType Type { System::Web::UI::WebControls::ValidationDataType get(); void set(System::Web::UI::WebControls::ValidationDataType value); };
[System.ComponentModel.Bindable(false)]
public System.Web.UI.WebControls.ValidationDataType Type { get; set; }
[<System.ComponentModel.Bindable(false)>]
member this.Type : System.Web.UI.WebControls.ValidationDataType with get, set
Public Property Type As ValidationDataType

属性值

要比较的两个值的数据类型。

属性

例外

指定的值不是值 ValidationDataType 之一。

注解

下表包含枚举的定义 ValidationDataType 。 在进行比较之前,这些值将隐式转换为指定的数据类型。 如果数据转换失败,数据验证将失败。

Enumeration 价值 数据类型
String 0 String
Integer 1 Integer
Double 2 Double
Date 3 DateTime
Currency 4 Currency

适用于

另请参阅