7
Presented by. Zaiyaul Haque

ASP.NET Validation Control

Embed Size (px)

Citation preview

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