Monday, March 1, 2010

Validation Server Control Description...

Validation in ASP.NET 2.0

Validation server controls are set of controls that enable you to work with the information your end users inputs into application. Application should always ensure that valid data is recorded. To ensure valid data is collected, we apply set of validations to data we collect. Validation is a set of rules that you apply to the data you collect. In this way, we can bring certain degree of discipline in end user.
We can understand validation under two categories: Client side validation and Server side validation. Client side validation involves validating user input before the page is posted to server. Server side validation involves performing checks on server instead of client. This is most secure form but comes at cost of performance.

ASP.NET introduced smart validation server controls to implement page level validations. They are capable of performing both server side and client side validations. So, Validation server controls offer the combined power of both approaches such that the security of application is never compromised.
ASP.NET 2.0 Validation server controls
Presently, ASP.NET 2.0 offers six validation controls. It also added new features like Validation groups and new JavaScript capabilities.
◦RequiredFieldValidator
◦CompareValidator
◦RangeValidator
◦RegularExpressionValidator
◦CustomValidator
◦ValidationSummary