語言

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 舉的定義。 在比較前,這些值會隱含地轉換為指定的資料型態。 若資料轉換失敗,資料驗證也會失敗。

列舉型別 價值觀 資料類型
String 0 String
Integer 1 Integer
Double 2 Double
Date 3 DateTime
Currency 4 Currency

適用於

另請參閱