How you will implement validations in Web Applications?

Using scripting languages like javascript or Jscript or by using Validation controls provided by ASP.NET

The Web Forms framework includes a set of validation server controls that provide an easy-to-use but powerful way to check input forms for errors and, if necessary, display messages to the user

There are also validation controls for specific types of validation, such as range checking or pattern matching. The following table lists the validation controls.

Control Name

Description

RequiredFieldValidator

Ensures that the user does not skip an entry.

CompareValidator

Compares a user's entry with a constant value or a property value of another control using a comparison operator (less than, equal to, greater than, and so on).

RangeValidator

Checks that a user's entry is between specified lower and upper boundaries. You can check ranges within pairs of numbers, alphabetic characters, or dates. Boundaries can be expressed as constants.

RegularExpressionValidator

Checks that the entry matches a pattern defined by a regular expression. This type of validation allows you to check for predictable sequences of characters, such as those in social security numbers, e-mail addresses, telephone numbers, postal codes, and so on.

CustomValidator

Checks the user's entry using validation logic that you code yourself. This type of validation allows you to check for values derived at run time.

ValidationSummary

Displays the validation errors in summary form for all of the validators on a page.