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
1. Compare Validator
◦ Compares input to: datatype, constant, another
control, database value, etc.
1. Range Validator
◦ Entry within a specified data range
4. RegularExpressionValidator
◦ Check format against a specific pattern
◦ E-mail address, phone number, zip code, etc.
4. CustomValidator
◦ Write own code
◦ Server- or client-side
4. ValidationSummary
◦ Summarizes all errors on page
 Easy to use
 Flexible
◦ Validate any type of input
 Combines client- and server-side validation in one
control
ASP.NET Validation Control

ASP.NET Validation Control

  • 1.
  • 2.
  • 3.
     Each control: ◦Validates user inputs on client-side using JavaScript  When possible ◦ Validates all inputs on server ◦ Writes client-side error message if invalid
  • 4.
    1. Required FieldValidator ◦Only validator that checks for NO entry 1. Compare Validator ◦ Compares input to: datatype, constant, another control, database value, etc. 1. Range Validator ◦ Entry within a specified data range
  • 5.
    4. RegularExpressionValidator ◦ Checkformat against a specific pattern ◦ E-mail address, phone number, zip code, etc. 4. CustomValidator ◦ Write own code ◦ Server- or client-side 4. ValidationSummary ◦ Summarizes all errors on page
  • 6.
     Easy touse  Flexible ◦ Validate any type of input  Combines client- and server-side validation in one control