SlideShare a Scribd company logo
KS TECHNOLOGIES
Visit us: http://www.kstechnologies.co
Live Project training for BCA / MCA / BE / Diploma
in Vadodara
For Details Call us @ +91-84870 42221, +91-98245 07547
VALIDATION
CONTROLS IN
ASP.NET
Visit us: http://www.kstechnologies.co
Validation Controls
 ASP.NET validation controls validate the user
input data to ensure that useless,
unauthenticated, or contradictory data don't get
stored.
 ASP.NET provides the following validation
controls:
 RequiredFieldValidator
 RangeValidator
 CompareValidator
 RegularExpressionValidator
 CustomValidator
 ValidationSummary
RequiredFieldValidator Control
 The RequiredFieldValidator control ensures
that the required field is not empty. It is
generally tied to a text box to force input into
the text box.
RangeValidator Control
 The RangeValidator control verifies that the
input value falls within a predetermined range.
 It has three specific properties:
 Properties Description Type It defines the type
of the data. The available values are:
Currency, Date, Double, Integer, and String.
MinimumValue It specifies the minimum value
of the range. MaximumValue It specifies the
maximum value of the range.
CompareValidator Control
 The CompareValidator control compares a value
in one control with a fixed value or a value in
another control.
 It has the following specific properties:
 Properties Description Type It specifies the data
type. ControlToCompare It specifies the value of
the input control to compare with.
ValueToCompare It specifies the constant value to
compare with. Operator It specifies the
comparison operator, the available values are:
Equal, NotEqual, GreaterThan,
GreaterThanEqual, LessThan, LessThanEqual,
RegularExpressionValidator
 The RegularExpressionValidator allows validating
the input text by matching against a pattern of a
regular expression. The regular expression is set
in the ValidationExpression property.
 The following table summarizes the commonly
used syntax constructs for regular expressions:
 Character Escapes Description b Matches a
backspace. t Matches a tab. r Matches a
carriage return. v Matches a vertical tab. f
Matches a form feed. n Matches a new line. 
Escape character.
CustomValidator
 he CustomValidator control allows writing
application specific custom validation routines for
both the client side and the server side validation.
 The client side validation is accomplished through
the ClientValidationFunction property. The client
side validation routine should be written in a
scripting language, such as JavaScript or
VBScript, which the browser can understand.
 The server side validation routine must be called
from the control's ServerValidate event handler.
The server side validation routine should be
written in any .Net language, like C# or VB.Net.
ValidationSummary
 The ValidationSummary control does not perform
any validation but shows a summary of all errors
in the page. The summary displays the values of
the ErrorMessage property of all validation
controls that failed validation.
 The following two mutually inclusive properties list
out the error message:
 ShowSummary : shows the error messages in
specified format.
 ShowMessageBox : shows the error messages
in a separate window.
Validation controls in asp

More Related Content

PPTX
Asp.NET Validation controls
PPTX
Jdbc ppt
PPSX
ASP.NET Web form
PPTX
Introduction to ASP.NET
PPTX
Event In JavaScript
PPTX
4. listbox
PPTX
Session And Cookies In Servlets - Java
PPT
Developing an ASP.NET Web Application
Asp.NET Validation controls
Jdbc ppt
ASP.NET Web form
Introduction to ASP.NET
Event In JavaScript
4. listbox
Session And Cookies In Servlets - Java
Developing an ASP.NET Web Application

What's hot (20)

PDF
Introduction to CSS3
PPTX
PPTX
Css animation
PDF
Enterprise java unit-3_chapter-1-jsp
PPTX
CSS Transitions, Transforms, Animations
PPTX
Event handling
PPSX
Sessions and cookies
PDF
Flutter and Dart MCQS
PPT
Day 4: Android: UI Widgets
PDF
JavaScript - Chapter 12 - Document Object Model
PPTX
Javascript
PPTX
HTML Text formatting tags
PPSX
Introduction to Html5
PPTX
Bootstrap - Basics
PPTX
Lab #2: Introduction to Javascript
PPT
JavaScript Objects
PPT
Java: GUI
Introduction to CSS3
Css animation
Enterprise java unit-3_chapter-1-jsp
CSS Transitions, Transforms, Animations
Event handling
Sessions and cookies
Flutter and Dart MCQS
Day 4: Android: UI Widgets
JavaScript - Chapter 12 - Document Object Model
Javascript
HTML Text formatting tags
Introduction to Html5
Bootstrap - Basics
Lab #2: Introduction to Javascript
JavaScript Objects
Java: GUI
Ad

Viewers also liked (11)

PDF
Nikhil Khandelwal BCA 3rd Year
PDF
Licenças para área de restinga
PDF
Bca sem 5 c# practical
PPTX
ASP.NET State management
PPT
State management in ASP.NET
PPT
ASP .net MVC
PDF
TYBSC IT SEM 6 IPR/CL
PDF
TYBSC IT SEM 6 PROJECT MANAGEMENT NOTES
PDF
tybsc it asp.net full unit 1,2,3,4,5,6 notes
PPT
Online voting system ppt by anoop
PDF
Network security unit 1,2,3
Nikhil Khandelwal BCA 3rd Year
Licenças para área de restinga
Bca sem 5 c# practical
ASP.NET State management
State management in ASP.NET
ASP .net MVC
TYBSC IT SEM 6 IPR/CL
TYBSC IT SEM 6 PROJECT MANAGEMENT NOTES
tybsc it asp.net full unit 1,2,3,4,5,6 notes
Online voting system ppt by anoop
Network security unit 1,2,3
Ad

Similar to Validation controls in asp (20)

PPTX
Asp.net validation
PPTX
Validation in asp.net
PPTX
Validation Controls in asp.net
PPTX
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
PPTX
Introduction to validation
PDF
validation-controls.pdf ioue8n uoh souu o3i
PPTX
Validation controls in asp
PDF
Chapter 3 (validation control)
PPTX
validations in asp .net
PPTX
PPT
2310 b 07
PPT
Validation controls ppt
PPT
ASP.NET Session 10
PPTX
PPT
validation
PPTX
validation of aap.net
PDF
Input validation errors
PPT
validation
PPTX
44CON 2013 - .Net Havoc - Manipulating Properties of Dormant Server Side Web ...
PDF
Validation in Jakarta Struts 1.3
Asp.net validation
Validation in asp.net
Validation Controls in asp.net
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
Introduction to validation
validation-controls.pdf ioue8n uoh souu o3i
Validation controls in asp
Chapter 3 (validation control)
validations in asp .net
2310 b 07
Validation controls ppt
ASP.NET Session 10
validation
validation of aap.net
Input validation errors
validation
44CON 2013 - .Net Havoc - Manipulating Properties of Dormant Server Side Web ...
Validation in Jakarta Struts 1.3

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Institutional Correction lecture only . . .
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Computing-Curriculum for Schools in Ghana
Cell Types and Its function , kingdom of life
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pre independence Education in Inndia.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Renaissance Architecture: A Journey from Faith to Humanism
Anesthesia in Laparoscopic Surgery in India
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
TR - Agricultural Crops Production NC III.pdf
Cell Structure & Organelles in detailed.
2.FourierTransform-ShortQuestionswithAnswers.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Sports Quiz easy sports quiz sports quiz
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Abdominal Access Techniques with Prof. Dr. R K Mishra
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Institutional Correction lecture only . . .
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Computing-Curriculum for Schools in Ghana

Validation controls in asp

  • 1. KS TECHNOLOGIES Visit us: http://www.kstechnologies.co Live Project training for BCA / MCA / BE / Diploma in Vadodara For Details Call us @ +91-84870 42221, +91-98245 07547
  • 2. VALIDATION CONTROLS IN ASP.NET Visit us: http://www.kstechnologies.co
  • 3. Validation Controls  ASP.NET validation controls validate the user input data to ensure that useless, unauthenticated, or contradictory data don't get stored.  ASP.NET provides the following validation controls:  RequiredFieldValidator  RangeValidator  CompareValidator  RegularExpressionValidator  CustomValidator  ValidationSummary
  • 4. RequiredFieldValidator Control  The RequiredFieldValidator control ensures that the required field is not empty. It is generally tied to a text box to force input into the text box.
  • 5. RangeValidator Control  The RangeValidator control verifies that the input value falls within a predetermined range.  It has three specific properties:  Properties Description Type It defines the type of the data. The available values are: Currency, Date, Double, Integer, and String. MinimumValue It specifies the minimum value of the range. MaximumValue It specifies the maximum value of the range.
  • 6. CompareValidator Control  The CompareValidator control compares a value in one control with a fixed value or a value in another control.  It has the following specific properties:  Properties Description Type It specifies the data type. ControlToCompare It specifies the value of the input control to compare with. ValueToCompare It specifies the constant value to compare with. Operator It specifies the comparison operator, the available values are: Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan, LessThanEqual,
  • 7. RegularExpressionValidator  The RegularExpressionValidator allows validating the input text by matching against a pattern of a regular expression. The regular expression is set in the ValidationExpression property.  The following table summarizes the commonly used syntax constructs for regular expressions:  Character Escapes Description b Matches a backspace. t Matches a tab. r Matches a carriage return. v Matches a vertical tab. f Matches a form feed. n Matches a new line. Escape character.
  • 8. CustomValidator  he CustomValidator control allows writing application specific custom validation routines for both the client side and the server side validation.  The client side validation is accomplished through the ClientValidationFunction property. The client side validation routine should be written in a scripting language, such as JavaScript or VBScript, which the browser can understand.  The server side validation routine must be called from the control's ServerValidate event handler. The server side validation routine should be written in any .Net language, like C# or VB.Net.
  • 9. ValidationSummary  The ValidationSummary control does not perform any validation but shows a summary of all errors in the page. The summary displays the values of the ErrorMessage property of all validation controls that failed validation.  The following two mutually inclusive properties list out the error message:  ShowSummary : shows the error messages in specified format.  ShowMessageBox : shows the error messages in a separate window.