Top Banner
Presented by. Zaiyaul Haque
7
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ASP.NET Validation Control

Presented by. Zaiyaul Haque

Page 2: ASP.NET Validation Control

Six Validation Controls

Page 3: ASP.NET Validation Control

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

JavaScript When possible

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

Page 4: ASP.NET Validation Control

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

Page 5: ASP.NET Validation Control

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

Page 6: ASP.NET Validation Control

Easy to use Flexible

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

in one control

Page 7: ASP.NET Validation Control