What are different types of validation in ASP.NET Server Control?

Type of validation  Control to use Description
Required entry RequiredFieldValidator Ensures that the user does not skip an entry.
Comparison to a value CompareValidator Compares a user's entry against a constant value, against the value of another control (using a comparison operator such as less than, equal, or greater than), or for a specific data type
Range checking RangeValidator Checks that a user's entry is between specified lower and upper boundaries
Pattern matching RegularExpressionValidator Checks that the entry matches a pattern defined by a regular expression. This type of validation enables you to check for predictable sequences of characters, such as those in e-mail addresses, telephone numbers, postal codes, and so on
User-defined CustomValidator Checks the user's entry using validation logic that you write yourself. This type of validation enables you to check for values derived at run time.


What is Validation Groups in ASP.NET?


  • Validation groups allow you to organize validation controls on a page as a set.
  • Each validation group can perform validation independently from other validation groups on the page.
  • Each validation group can be attached to button for validating all validator controls belongs to that gourp.

What is differences between GridView, DetailView and FormView?


  GridView DetailView FormView
Display: All rows in table Show's Details of each row in separate space Appears in separate space
Occues When: Grid is loaded When row is clicked

Inserting new row

Updading existing row

Viewing single row