Continued from page 1
• Range Validation control: Prompts message to user, if data entered in input field is not within range of values specified by Maximum and Minimum properties of validation control.
• Comparison Validation control: Allows user to compare two values and check for comparisons such as equality, greater-than, less-than etc. In addition you can check whether data entered in input field is of data type as specified by you.
• RegularExpression Validation control: Allows you to validate if format of a certain input field is correct or not. You can check validation of commonly performed formats such as social security numbers, e-mail addresses, telephone numbers, and postal code.
• Custom Validation control: Allows you to define your own condition for validating data in input fields. Two validation functions can be performed using Custom Validation control: first on server-side and second on client-side. These functions contain logic defined by you to validate input fields. These functions returns True value and False value, if condition you specified is correct or not respectively.
If control’s value does not validate to what you have specified in validation control tag, web form displays an error message. Moreover, you can customize format of error message by using control properties such as BackColor, BorderStyle, and BorderWidth. In addition, you can use Cascading Style Sheet (CSS) to format an error message.
To access online version of above article, please go to http://www.dotnet-guide.com/validation.html
Visit http://www.dotnet-guide.com for a complete introduction to .NET framework. Learn about ASP.NET, VB.NET, C# and other related technologies.