My Profile

Thursday, February 10, 2011

ASP.Net Validation Controls Introduction


Hello Friendzz…

Till now we have worked with different controls, navigation between forms, and how to work (data binding) in the web environment etc., 

and now we are going to discuss about a new topic “Validations”.

It is also a major requirement in the web forms. Every web page requires validations in client side as well as server side. Validation means “simple set of statements that are written to check whether the given input is in correct format or with correct values”.

Client side validations means the validations which are to be performed on client side i.e., say Browser.

Ex: checking whether an input (say User Id) is provided or not is client side validation.

Server side validations mean the validations which are to be performed on server side.

Ex: checking whether the entered user id already exists in Database or not is server side validation.

How every web developer performs these validations?
·        
     For client side validations, Java Script coding is written and sent to client for execution.
·       For server side, validations are performed using server side programming language.

But in both cases user must write code to perform validations.

How to perform validations in ASP.Net web forms?

As part of its controls, ASP.Net provides one category called “Validation”. In this category, we have validation controls which automate the process of performing validation. Every ASP.Net validation control generates Javascript code for client side validations and server side code for server validations automatically.

User has to provide few inputs to mention what type of validation is required.

ASP.Net supports the following Validation Controls to perform different requirements:
·       RequiredFieldValidator
·       RangeValidator
·       CompareValidator
·       RegularExpressionValidator
·       CustomValidator
·       ValidationSummary
·       Dynamicvalidator (.Net 4.0)

 

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support"

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More