miércoles, 17 de marzo de 2010

The Client-Side API - ASP.NET Validation

Client-side objects

NameTypeDescription
Page_IsValidBoolean variableIndicates whether the page is currently valid. The validation scripts keep this up to date at all times.
Page_ValidatorsArray of elementsThis is an array containing all of the validators on the page.
Page_ValidationActiveBoolean variableIndicates whether validation should take place. Set this variable to False to turn off validation programmatically.
isvalidBoolean propertyThis is a property on each client validator indicating whether it is currently valid.

Functions called from client-side script

NameDescription
ValidatorValidate(val)Takes a client-validator as input. Makes the validator check its input and update its display.
ValidatorEnable(val, enable)Takes a client-validator and a Boolean value. Enables or disables a client validator. Being disabled will stop it from evaluating and it will always appear valid.
ValidatorHookupControl(control, val)Takes an input HTML element and a client-validator. Modifies or creates the element's change event so that it updates the validator when changed. This can be useful for custom validators that depend on multiple input values.

No hay comentarios:

Publicar un comentario