Edit

Share via


CompareValidator.Type Property

Definition

Gets or sets the data type of the two values being compared. The default value is string. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with 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

Property Value

The data type of the two values being compared.

Attributes

Exceptions

the specified value is not one of the ValidationDataType values.

Remarks

The following table contains the definitions of the ValidationDataType enumerations. The values are implicitly converted to the specified data type before the comparison is made. If the data conversion fails, data validation fails.

Enumeration Value Data type
String 0 String
Integer 1 Integer
Double 2 Double
Date 3 DateTime
Currency 4 Currency

Applies to

See also