Saturday, July 21, 2007

Validation Controls Basics, Common Properties and Types

Validation Controls Basics:
All validation controls inherit from the base class BaseValidator
Validation Controls always perform validation on the server
Always use Page.IsValid, client side validation fails if scripting is turned off

Properties common to all validators are:

ControlToValidate
ErrorMessage
IsValid
Validate
Display
None: Dont display error message
Static: Reserve space for the error message
Dynamic: Auto add space when validation fails

Types of Validation Controls:
RequiredFieldValidation
CompareValidator
RangeValidator
RegularExpressionValidator
CustomValidator

No comments:

Post a Comment