In order to validate user input, ASP.NET provides validation server controls. All validation controls inherits from BaseValidator class which contains the common validation properties and methods like
ControlToValidate,Enabled, IsValid, EnableClientScript, ValidationGroup,Validate() etc.ASP.NET provides a range of validation controls:
RequiredFieldValidatorvalidates compulsory/required input.RangeValidatorvalidates the range. Validates that input falls between the given range values.CompareValidatorvalidates or compares the input of a control with another control value or with a fixed value.RegularExpressionValidatorvalidates input value against a defined regular expression pattern.CustomValidatorallows to customize the validation logic with respect to our application logic.ValidationSummarydisplays all errors on page collectively.
No comments:
Post a Comment