asp.net validation control

7
Presented by. Zaiyaul Haque

Upload: zaiyaul-haque

Post on 08-Aug-2015

119 views

Category:

Education


0 download

TRANSCRIPT

Presented by. Zaiyaul Haque

Six Validation Controls

Each control:◦ Validates user inputs on client-side using

JavaScript When possible

◦ Validates all inputs on server◦ Writes client-side error message if invalid

1. Required FieldValidator◦ Only validator that checks for NO entry

2. Compare Validator◦ Compares input to: datatype, constant, another

control, database value, etc.

3. Range Validator◦ Entry within a specified data range

4. RegularExpressionValidator◦ Check format against a specific pattern◦ E-mail address, phone number, zip code, etc.

5. CustomValidator◦ Write own code◦ Server- or client-side

6. ValidationSummary◦ Summarizes all errors on page

Easy to use Flexible

◦ Validate any type of input Combines client- and server-side validation

in one control