ASP.Net Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 2302 Page Views: 

Explain various Validation Controls available in ASP.Net?



Posted By: Avi Date: 30 November 2009 03:28:15 PM
 Answer:

There are five types of Validation Controls available in ASP.Net:

1) RequiredField Validation control:
It prompts message if any input field is left blank. This validation control can also be used to prompt message to the user if he or she has left any input field with its default value.

2) Range Validation control:
It prompts message to the user, if the data entered in the input field is not within the range of the values specified by the Maximum and Minimum properties of the validation control.

3) Comparison Validation control:
It allows the user to compare two values and check for comparisons such as equality, greater-than, less-than etc. In addition you can check whether the data entered in the input field is of the data type as specified by you.

4) RegularExpression Validation control:
It allows you to validate if the format of a certain input field is correct or not. You can check the validation of the commonly performed formats such as social security numbers, e-mail addresses, telephone numbers, and postal code.

5) Custom Validation control:
It allows you to define your own condition for validating the data in the input fields. Two validation functions can be performed using Custom Validation control: first on the server-side and second on the client-side. These functions contain logic defined by you to validate the input fields. These functions returns the True value and False value, if the condition you specified is correct or not respectively.


Posted By: eTechPlanet


Date: 30 November 2009 03:28:15 PM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image DYfxKL
Related Questions
ASP.Net : What are the advantages of pre-compilation in asp.net?

What are the advantages of pre-compilation in asp.net?

1. the performance is increased as the site has already been compiled and when it is requested no ti....
Category: ASP.Net Date: 10/1/2010 2:48:19 AM
ASP.Net : Which class manages the view state of ASP.NET server controls, including pages?

Which class manages the view state of ASP.NET server controls, including pages?

StateBag class. This class can not be inherited. Synatx:- Public NotInheritable Class StateBag _ I....
Category: ASP.Net Date: 10/1/2010 2:35:13 AM
ASP.Net : List the pre-processor words ?

List the pre-processor words ?

#if #else #endif #define #undef #warning #error #line #region #endregion are the main used directiv....
Category: ASP.Net Date: 10/1/2010 2:25:14 AM
ASP.Net : Can we prevent a browser from caching an ASPX page?

Can we prevent a browser from caching an ASPX page?

Yes , it can be prevented by using Response.Cache.SetNoStore() method.
Category: ASP.Net Date: 10/1/2010 2:04:13 AM
ASP.Net : What does .Net framework specifies?

What does .Net framework specifies?

.NET Framework is a collection of tools that makes the software development easier and faster. It co....
Category: ASP.Net Date: 10/1/2010 1:46:14 AM