Tuesday 24 January 2012

Validation Server Controls


A Validation server control is used to validate the data of an input control. If the data does not pass validation, it will display an error message to the user.
The syntax for creating a Validation server control is:
<asp:control_name id="some_id" runat="server" />

Validation Server ControlDescription
CompareValidatorCompares the value of one input control to the value of another input control or to a fixed value
CustomValidatorAllows you to write a method to handle the validation of the value entered
RangeValidatorChecks that the user enters a value that falls between two values
RegularExpressionValidatorEnsures that the value of an input control matches a specified pattern
RequiredFieldValidatorMakes an input control a required field
ValidationSummaryDisplays a report of all validation errors occurred in a Web page

No comments: