Tutorial by Examples

ASP.NET validation controls validate the user input data to ensure that useless, unauthenticated, or contradictory data don't get stored. ASP.NET provides the following validation controls: RequiredFieldValidator RangeValidator CompareValidator RegularExpressionValidator CustomValidator Val...
The RequiredFieldValidator control ensures that the required field is not empty. It is generally tied to a text box to force input into the text box. The syntax of the control is as given: <asp:RequiredFieldValidator ID="rfvcandidate" runat="server" ControlToValidate =&...
The RangeValidator control verifies that the input value falls within a predetermined range. It has three specific properties: PropertiesDescriptionTypeIt defines the type of the data. The available values are: Currency, Date,MinimumValueIt specifies the minimum value of the range.MaximumValueIt s...
The CompareValidator control compares a value in one control with a fixed value or a value in another control. It has the following specific properties: PropertiesDescriptionTypeIt specifies the data type.ControlToCompareIt specifies the value of the input control to compare with.ValueToCompareIt ...
The RegularExpressionValidator allows validating the input text by matching against a pattern of a regular expression. The regular expression is set in the ValidationExpression property. The following table summarizes the commonly used syntax constructs for regular expressions: Character EscapesDe...
The ValidationSummary control does not perform any validation but shows a summary of all errors in the page. The summary displays the values of the ErrorMessage property of all validation controls that failed validation. The following two mutually inclusive properties list out the error message: S...
Complex pages have different groups of information provided in different panels. In such situation, a need might arise for performing validation separately for separate group. This kind of situation is handled using validation groups. To create a validation group, you should put the input controls ...

Page 1 of 1