SlideShare a Scribd company logo
1 of 8
.NET Validation Controls.NET Validation Controls
MacDonald Ch. 8MacDonald Ch. 8
MIS 324MIS 324
Professor SandvigProfessor Sandvig
TodayToday
What Validation controls doWhat Validation controls do
Benefits & LimitationsBenefits & Limitations
Six Validation ControlsSix Validation Controls
Implementation ExampleImplementation Example
What Validation Controls DoWhat Validation Controls Do
Each control:Each control:
– Validates user inputs on client-side using JavaScriptValidates user inputs on client-side using JavaScript
When possibleWhen possible
– Validates all inputs on serverValidates all inputs on server
– Writes client-side error message if invalidWrites client-side error message if invalid
Benefits and LimitationsBenefits and Limitations
BenefitsBenefits
– ConvenienceConvenience
Cut & pasteCut & paste
– Bomb-proofBomb-proof
Server-side validationServer-side validation
LimitationsLimitations
– Must remember to check on serverMust remember to check on server
Page.IsValid statementPage.IsValid statement
Six Validation ControlsSix Validation Controls
1.1. RequiredFieldValidatorRequiredFieldValidator
– Only validator that checks for NO entryOnly validator that checks for NO entry
1.1. CompareValidatorCompareValidator
– Compares input to: datatype, constant,Compares input to: datatype, constant,
another control, database value, etc.another control, database value, etc.
1.1. RangeValidatorRangeValidator
– Entry within a specified data rangeEntry within a specified data range
Six Validation ControlsSix Validation Controls
4.4. RegularExpressionValidatorRegularExpressionValidator
– Check format against a specific patternCheck format against a specific pattern
– E-mail address, phone number, zip code, etc.E-mail address, phone number, zip code, etc.
4.4. CustomValidatorCustomValidator
– Write own codeWrite own code
– Server- or client-sideServer- or client-side
4.4. ValidationSummaryValidationSummary
– Summarizes all errors on pageSummarizes all errors on page
ImplementationImplementation
Often need > 1 validator per inputOften need > 1 validator per input
– Only RequiredFieldValidator checks for empty fieldsOnly RequiredFieldValidator checks for empty fields
Page.IsValidPage.IsValid
– Check in event handlerCheck in event handler
if (!Page.IsValid) return;if (!Page.IsValid) return;
Validation GroupsValidation Groups
– Allow validation controls to be assigned to groupsAllow validation controls to be assigned to groups
– Page can have several groupsPage can have several groups
– Act independentlyAct independently
– Only group associated with postback event must have valid entriesOnly group associated with postback event must have valid entries
– Example:Example: No groupsNo groups, groups, groups
Example:Example:
– Required, Compare, Range,Required, Compare, Range,
& Custom (client- and server-side script)& Custom (client- and server-side script)
– Validation.aspx (source)Validation.aspx (source)
SummarySummary
Easy to useEasy to use
FlexibleFlexible
– Validate any type of inputValidate any type of input
Combines client- and server-sideCombines client- and server-side
validation in one controlvalidation in one control
Bomb-proof server-side validationBomb-proof server-side validation

More Related Content

Similar to validation

Validation Controls in asp.net
Validation Controls in asp.netValidation Controls in asp.net
Validation Controls in asp.netDeep Patel
 
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...Amazon Web Services
 
Test Automation and Continuous Integration
Test Automation and Continuous Integration Test Automation and Continuous Integration
Test Automation and Continuous Integration TestCampRO
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryDaniel Miessler
 
Windmill Testing certification
Windmill Testing certificationWindmill Testing certification
Windmill Testing certificationVskills
 
Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018
Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018
Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018Amazon Web Services
 
Asp.NET Validation controls
Asp.NET Validation controlsAsp.NET Validation controls
Asp.NET Validation controlsGuddu gupta
 
Validation controls in asp
Validation controls in aspValidation controls in asp
Validation controls in aspShishir Jain
 
validation-controls.pdf ioue8n uoh souu o3i
validation-controls.pdf ioue8n uoh souu  o3ivalidation-controls.pdf ioue8n uoh souu  o3i
validation-controls.pdf ioue8n uoh souu o3iCoRRexGaMing
 
Operations: Production Readiness
Operations: Production ReadinessOperations: Production Readiness
Operations: Production ReadinessAmazon Web Services
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarBitbar
 
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptxvnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptxYamunaS38
 
Introduction to validation
Introduction to validationIntroduction to validation
Introduction to validationrlavadiya
 
Experitest & Wipro Co-Webinar
Experitest & Wipro Co-Webinar Experitest & Wipro Co-Webinar
Experitest & Wipro Co-Webinar Experitest
 
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...Edureka!
 
Start Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From HappeningStart Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From HappeningAmazon Web Services
 
(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should knowRichard Cheng
 
ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10Sisir Ghosh
 

Similar to validation (20)

Validation Controls in asp.net
Validation Controls in asp.netValidation Controls in asp.net
Validation Controls in asp.net
 
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
 
Test Automation and Continuous Integration
Test Automation and Continuous Integration Test Automation and Continuous Integration
Test Automation and Continuous Integration
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request Forgery
 
Windmill Testing certification
Windmill Testing certificationWindmill Testing certification
Windmill Testing certification
 
Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018
Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018
Advanced Continuous Delivery Best Practices (DEV317-R1) - AWS re:Invent 2018
 
Asp.NET Validation controls
Asp.NET Validation controlsAsp.NET Validation controls
Asp.NET Validation controls
 
Validation controls in asp
Validation controls in aspValidation controls in asp
Validation controls in asp
 
validation-controls.pdf ioue8n uoh souu o3i
validation-controls.pdf ioue8n uoh souu  o3ivalidation-controls.pdf ioue8n uoh souu  o3i
validation-controls.pdf ioue8n uoh souu o3i
 
Operations: Production Readiness
Operations: Production ReadinessOperations: Production Readiness
Operations: Production Readiness
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptxvnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
 
Types of Non Functional Testing
Types of Non Functional TestingTypes of Non Functional Testing
Types of Non Functional Testing
 
Introduction to validation
Introduction to validationIntroduction to validation
Introduction to validation
 
loadrunner
loadrunnerloadrunner
loadrunner
 
Experitest & Wipro Co-Webinar
Experitest & Wipro Co-Webinar Experitest & Wipro Co-Webinar
Experitest & Wipro Co-Webinar
 
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
Software Testing Tutorial For Beginners | Manual & Automation Testing | Selen...
 
Start Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From HappeningStart Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
 
(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know
 
ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10
 

More from teach4uin

Master pages
Master pagesMaster pages
Master pagesteach4uin
 
.Net framework
.Net framework.Net framework
.Net frameworkteach4uin
 
Scripting languages
Scripting languagesScripting languages
Scripting languagesteach4uin
 
State management
State managementState management
State managementteach4uin
 
security configuration
security configurationsecurity configuration
security configurationteach4uin
 
static dynamic html tags
 static dynamic html tags static dynamic html tags
static dynamic html tagsteach4uin
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tagsteach4uin
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationteach4uin
 
.Net overview
.Net overview.Net overview
.Net overviewteach4uin
 
Stdlib functions lesson
Stdlib functions lessonStdlib functions lesson
Stdlib functions lessonteach4uin
 
Cprogrammingprogramcontrols
CprogrammingprogramcontrolsCprogrammingprogramcontrols
Cprogrammingprogramcontrolsteach4uin
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperatorteach4uin
 
3 data-types-in-c
3 data-types-in-c3 data-types-in-c
3 data-types-in-cteach4uin
 

More from teach4uin (20)

Master pages
Master pagesMaster pages
Master pages
 
.Net framework
.Net framework.Net framework
.Net framework
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Css1
Css1Css1
Css1
 
Code model
Code modelCode model
Code model
 
Asp db
Asp dbAsp db
Asp db
 
State management
State managementState management
State management
 
security configuration
security configurationsecurity configuration
security configuration
 
static dynamic html tags
 static dynamic html tags static dynamic html tags
static dynamic html tags
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tags
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
.Net overview
.Net overview.Net overview
.Net overview
 
Stdlib functions lesson
Stdlib functions lessonStdlib functions lesson
Stdlib functions lesson
 
enums
enumsenums
enums
 
memory
memorymemory
memory
 
array
arrayarray
array
 
Cprogrammingprogramcontrols
CprogrammingprogramcontrolsCprogrammingprogramcontrols
Cprogrammingprogramcontrols
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
 
3 data-types-in-c
3 data-types-in-c3 data-types-in-c
3 data-types-in-c
 
functions
functionsfunctions
functions
 

Recently uploaded

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 

Recently uploaded (20)

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 

validation

  • 1. .NET Validation Controls.NET Validation Controls MacDonald Ch. 8MacDonald Ch. 8 MIS 324MIS 324 Professor SandvigProfessor Sandvig
  • 2. TodayToday What Validation controls doWhat Validation controls do Benefits & LimitationsBenefits & Limitations Six Validation ControlsSix Validation Controls Implementation ExampleImplementation Example
  • 3. What Validation Controls DoWhat Validation Controls Do Each control:Each control: – Validates user inputs on client-side using JavaScriptValidates user inputs on client-side using JavaScript When possibleWhen possible – Validates all inputs on serverValidates all inputs on server – Writes client-side error message if invalidWrites client-side error message if invalid
  • 4. Benefits and LimitationsBenefits and Limitations BenefitsBenefits – ConvenienceConvenience Cut & pasteCut & paste – Bomb-proofBomb-proof Server-side validationServer-side validation LimitationsLimitations – Must remember to check on serverMust remember to check on server Page.IsValid statementPage.IsValid statement
  • 5. Six Validation ControlsSix Validation Controls 1.1. RequiredFieldValidatorRequiredFieldValidator – Only validator that checks for NO entryOnly validator that checks for NO entry 1.1. CompareValidatorCompareValidator – Compares input to: datatype, constant,Compares input to: datatype, constant, another control, database value, etc.another control, database value, etc. 1.1. RangeValidatorRangeValidator – Entry within a specified data rangeEntry within a specified data range
  • 6. Six Validation ControlsSix Validation Controls 4.4. RegularExpressionValidatorRegularExpressionValidator – Check format against a specific patternCheck format against a specific pattern – E-mail address, phone number, zip code, etc.E-mail address, phone number, zip code, etc. 4.4. CustomValidatorCustomValidator – Write own codeWrite own code – Server- or client-sideServer- or client-side 4.4. ValidationSummaryValidationSummary – Summarizes all errors on pageSummarizes all errors on page
  • 7. ImplementationImplementation Often need > 1 validator per inputOften need > 1 validator per input – Only RequiredFieldValidator checks for empty fieldsOnly RequiredFieldValidator checks for empty fields Page.IsValidPage.IsValid – Check in event handlerCheck in event handler if (!Page.IsValid) return;if (!Page.IsValid) return; Validation GroupsValidation Groups – Allow validation controls to be assigned to groupsAllow validation controls to be assigned to groups – Page can have several groupsPage can have several groups – Act independentlyAct independently – Only group associated with postback event must have valid entriesOnly group associated with postback event must have valid entries – Example:Example: No groupsNo groups, groups, groups Example:Example: – Required, Compare, Range,Required, Compare, Range, & Custom (client- and server-side script)& Custom (client- and server-side script) – Validation.aspx (source)Validation.aspx (source)
  • 8. SummarySummary Easy to useEasy to use FlexibleFlexible – Validate any type of inputValidate any type of input Combines client- and server-sideCombines client- and server-side validation in one controlvalidation in one control Bomb-proof server-side validationBomb-proof server-side validation