SlideShare a Scribd company logo
3
Most read
BY-Teach4u.in
Today
What Validation controls do
Benefits & Limitations
Six Validation Controls
Implementation Example
What Validation Controls Do
Each control:
Validates user inputs on client-side using JavaScript
 When possible
Validates all inputs on server
Writes client-side error message if invalid
Benefits and Limitations
Benefits
Convenience
 Cut & paste
Bomb-proof
 Server-side validation
Limitations
Must remember to check on server
 Page.IsValid statement
Six Validation Controls
1. RequiredFieldValidator
 Only validator that checks for NO entry
1. CompareValidator
 Compares input to: datatype, constant, another
control, database value, etc.
1. RangeValidator
 Entry within a specified data range
Six Validation Controls
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
Implementation
 Often need > 1 validator per input
 Only RequiredFieldValidator checks for empty fields
 Page.IsValid
 Check in event handler
 if (!Page.IsValid) return;
 Validation Groups
 Allow validation controls to be assigned to groups
 Page can have several groups
 Act independently
 Only group associated with postback event must have valid entries
 Example: No groups, groups
 Example:
 Required, Compare, Range,
& Custom (client- and server-side script)
 Validation.aspx (source)
Summary
Easy to use
Flexible
Validate any type of input
Combines client- and server-side validation in one
control
Bomb-proof server-side validation

More Related Content

PPTX
Validation in asp.net
PPTX
PPT
ASP.NET Validation Control
PPT
Validation controls ppt
PPTX
Validation Controls in asp.net
PPTX
Validation controls in asp
PPTX
Asp.NET Validation controls
PPTX
Asp.net validation
Validation in asp.net
ASP.NET Validation Control
Validation controls ppt
Validation Controls in asp.net
Validation controls in asp
Asp.NET Validation controls
Asp.net validation

What's hot (17)

PPTX
validations in asp .net
PPTX
Validation controls in asp
PPTX
Angular Form Validations
PPTX
Overview of Testing in RMsis
PPTX
Introduction to software testing
PPT
AppSight 5.0 Advanced Concepts Training
PPTX
Approval Process in Salesforce
PPTX
P04 - Vendor Management (MCU)
PPTX
Introduction to validation
PPT
Jquery validate - TuanNA
PPT
ASP.NET Session 10
PPTX
Tool Evaluation
PPTX
WilmaVER
DOCX
Approval process
PPT
Testcase
DOC
Sequnce diagram for ONLINE EXAMINATION SYSTEM
PDF
Automation Testing and its importance
validations in asp .net
Validation controls in asp
Angular Form Validations
Overview of Testing in RMsis
Introduction to software testing
AppSight 5.0 Advanced Concepts Training
Approval Process in Salesforce
P04 - Vendor Management (MCU)
Introduction to validation
Jquery validate - TuanNA
ASP.NET Session 10
Tool Evaluation
WilmaVER
Approval process
Testcase
Sequnce diagram for ONLINE EXAMINATION SYSTEM
Automation Testing and its importance
Ad

Viewers also liked (6)

PPTX
Controls
PPTX
L18 applets
PPTX
Java Programming- Introduction to Java Applet Programs
PPTX
Identifying the Inquiry and Stating the Problem
PPTX
6.applet programming in java
PDF
27 applet programming
Controls
L18 applets
Java Programming- Introduction to Java Applet Programs
Identifying the Inquiry and Stating the Problem
6.applet programming in java
27 applet programming
Ad

Similar to validation (14)

PPT
validation
PDF
validation-controls.pdf ioue8n uoh souu o3i
PPTX
PPTX
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
PPT
2310 b 07
PPTX
validation of aap.net
PPTX
LAYERS asp.net ppt
PPT
Defending against Injections
PDF
JavaScript - Chapter 14 - Form Handling
PPTX
Web topic 22 validation on web forms
PPTX
UNIT1.pptx Introduction to ASP.NET IN IMR COLLEGE JALGOAN
PPTX
Form Validation in JavaScript
PPT
Web controls
validation
validation-controls.pdf ioue8n uoh souu o3i
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
2310 b 07
validation of aap.net
LAYERS asp.net ppt
Defending against Injections
JavaScript - Chapter 14 - Form Handling
Web topic 22 validation on web forms
UNIT1.pptx Introduction to ASP.NET IN IMR COLLEGE JALGOAN
Form Validation in JavaScript
Web controls

More from teach4uin (20)

PPT
Master pages
PPTX
.Net framework
PPT
Scripting languages
PPTX
Css1
PPTX
Code model
PPT
Asp db
PPTX
State management
PPT
security configuration
PPT
static dynamic html tags
PPT
static dynamic html tags
PPTX
New microsoft office power point presentation
PPT
.Net overview
PPT
Stdlib functions lesson
PPT
enums
PPT
memory
PPT
array
PPT
storage clas
PPT
Cprogrammingprogramcontrols
PPT
Cprogrammingoperator
PPT
3 data-types-in-c
Master pages
.Net framework
Scripting languages
Css1
Code model
Asp db
State management
security configuration
static dynamic html tags
static dynamic html tags
New microsoft office power point presentation
.Net overview
Stdlib functions lesson
enums
memory
array
storage clas
Cprogrammingprogramcontrols
Cprogrammingoperator
3 data-types-in-c

Recently uploaded (20)

PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
RMMM.pdf make it easy to upload and study
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Insiders guide to clinical Medicine.pdf
PPTX
master seminar digital applications in india
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Pharma ospi slides which help in ospi learning
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
VCE English Exam - Section C Student Revision Booklet
RMMM.pdf make it easy to upload and study
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Insiders guide to clinical Medicine.pdf
master seminar digital applications in india
human mycosis Human fungal infections are called human mycosis..pptx
Cell Structure & Organelles in detailed.
Anesthesia in Laparoscopic Surgery in India
Supply Chain Operations Speaking Notes -ICLT Program
Complications of Minimal Access Surgery at WLH
Renaissance Architecture: A Journey from Faith to Humanism
Pharma ospi slides which help in ospi learning
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
school management -TNTEU- B.Ed., Semester II Unit 1.pptx

validation

  • 2. Today What Validation controls do Benefits & Limitations Six Validation Controls Implementation Example
  • 3. What Validation Controls Do 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. Benefits and Limitations Benefits Convenience  Cut & paste Bomb-proof  Server-side validation Limitations Must remember to check on server  Page.IsValid statement
  • 5. Six Validation Controls 1. RequiredFieldValidator  Only validator that checks for NO entry 1. CompareValidator  Compares input to: datatype, constant, another control, database value, etc. 1. RangeValidator  Entry within a specified data range
  • 6. Six Validation Controls 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
  • 7. Implementation  Often need > 1 validator per input  Only RequiredFieldValidator checks for empty fields  Page.IsValid  Check in event handler  if (!Page.IsValid) return;  Validation Groups  Allow validation controls to be assigned to groups  Page can have several groups  Act independently  Only group associated with postback event must have valid entries  Example: No groups, groups  Example:  Required, Compare, Range, & Custom (client- and server-side script)  Validation.aspx (source)
  • 8. Summary Easy to use Flexible Validate any type of input Combines client- and server-side validation in one control Bomb-proof server-side validation