Saturday, 14 April 2012

Validation Server Controls in asp.net

A Validation server control is used to validate the data which the user gives. If the data does not pass validation, it will display an warning message to the user.

 Validation Server Control Description:

CompareValidator :Compares the value of one input control to the value of another input control or to a fixed value.
CustomValidator: Allows you to write a method to handle the validation of the value entered.
RangeValidator: Checks that the user enters a value that falls between two values.
RegularExpressionValidator: Ensures that the value of an input control matches a specified pattern.
RequiredFieldValidator: Makes an input control a required field.
ValidationSummary:Displays a report of all validation errors occurred in a Web page.


The syntax for creating a Validation server control is:


<asp:controlname id="someid" runat="server" />

No comments:

Post a Comment