Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Build Your Own ASP.NET 2.0 Web Site Using CSharp And VB (2006) [eng]-1.pdf
Скачиваний:
143
Добавлен:
16.08.2013
Размер:
15.69 Mб
Скачать

CustomValidator

ControlToValidate

specifies the ID of the control that you want to validate

Display

shows how the error message within the validation

 

control will be displayed; possible values are Static,

 

Dynamic, and None; default is Static

EnableClientScript

enables or disables client-side validation; by default, is

 

set to Enabled

Enabled

enables or disables client and server-side validation;

 

default is Enabled

ErrorMessage

specifies the error message that will be displayed to the

 

user in any associated validation summary control; if

 

no value is set for the Text property, this message also

 

appears in the control itself

IsValid

has the value True when the validation check succeeds,

 

and False otherwise

Operator

specifies the operator to use when performing compar-

 

isons; possible values are Equal, NotEqual, Greater-

 

Than, GreaterThanEqual, LessThan, LessThanEqual,

 

DataTypeCheck

Text

sets the error message displayed by the control when

 

validation fails

Type

specifies the data type to use when comparing values;

 

possible values are Currency, Date, Double, Integer,

 

and String

ValueToCompare

specifies the value used when performing the compar-

 

ison

Methods

Validate

performs validation and modifies the IsValid property

CustomValidator

ClientValidationFunction specifies the name of the client-side function to use for validation

629