SlideShare una empresa de Scribd logo
1 de 29
By:- Shishir Jain


Validation:- (valid data)





Check User Input
Against a Set of rules

Validation Type:


Client Side Validation
Server Side Validation

2


Asp. Net Provides Some validation controls .
These Controls are similar to other common
controls and can be used in the same way.



A Validation server control is used to validate
the data of an input control. If the data does not
pass validation, it will display an error message
to the user
3
The syntax for creating a Validation server control
is:
<asp:control_name id="some_id" runat="server" />

4


Required Field Validator



Compare Validator



Range Validator



Regular Expression Validator



Custom Validator



Validation Summary
5


Compare Validator :-Compares the value of

one input control to the value of another input
control or to a fixed value.


Required Field Validatior :-Makes an input
control a required field.



Range Validator :-Checks that the user enters a
value that falls between two values
6


Regular Expression Validator :-Ensures that the

value of an input control matches a specified
pattern


Custom Validator :-Allows you to write a method
to handle the validation of the value entered



Validation Summary:-Displays a report of all

validation errors occurred in a Web page
7


Used to make an input control a required field.



Validation fails if the input value does not change
from its initial value. By default, the initial value is
an empty string ("").



Leading and trailing spaces of the input value are
removed before validation.



The InitialValue property does not set the default

value for the input control. It indicates the value
that you do not want the user to enter in the input
control.

8


Properties
BackColor
 ControlToValidate:- id of Control
 Display:- None, Static, Dynamic
 EnableClientScript:- Boolean value
 Enabled: Bololean Value
 ErrorMessage:
The text to display in the
ValidationSummary control when validation fails.
This text will also be displayed in the validation
control if the Text property is not set


9


ForeColor



Id :-A unique id for the control



InitialValue :- Specifies the starting value of the
input control. Default value is "“



Runat:- Specifies that the control is a server control.
Must be set to "server"



Text:- The message to display when validation fails

10


Used to compare the value of one input control
to the value of another input control or to a
fixed value.



If the input control is empty, the validation will
succeed.

We

can

use

the

RequiredFieldValidator control to make the
field required.
11


Properties :


BackColor
ControlToCompare :- The name of the control to
compare with



ControlToValidate :- The id of the control to validate



Display:- None ,Static , Dynamic



EnableClientScript :- Boolean value



Enabled:- A Boolean value that specifies whether the
validation control is enabled or not
12


ErrorMessage



ForeColor



Operator:-. The type of comparison to perform. The operators are :
Equal, GreaterThan, GreaterThanEqual, LessThan,
LessThanEqual, NotEqual, DataTypeCheck



Runat



Text



Type :- Specifies the data type of the values to compare. The types
are: Currency,Date,Double,Integer,String,



ValueToCompare :-A specified value to compare with
13


Used to check that the user enters an input value that
falls between two values.



Possible to check ranges within numbers, dates, and
characters.



Validation will not fail if the input control is empty.
Use the RequiredFieldValidator control to make the
field required.



Validation will not fail if the input value cannot be
converted to the data type specified. Use the
CompareValidator control,
14


Properties
BackColor
 ControlToValidate
 Display:- None, Static, Dynamic
 EnableClientScript
 Enabled
 ErrorMessage
 ForeColor
 id


15


MaximumValue:- Specifies the maximum value of the
input control



MinimumValue:- Specifies the minimum value of the
input control



RunAt



Type:-Specifies the data type of the value to check. The
types are: Currency, Date, Double, Integer, String



Text:- The Message to be display when validation fails,

16


Used to ensure that an input value matches a specified

pattern.


Both server and client-side validation are performed
unless the browser does not support client-side

validation or the EnableClientScript property is set to
false.


Validation will not fail if the input control is empty.

Use the RequiredFieldValidator control to make the
field required.
17


Properties


BackColor



ControlToValidate



EnableClientScript



Enabled



ErrorMessage



ForeColor



Id
18




RunAt
Text
ValidationExpression:-Specifies the expression
used to validate input control. The expression
validation syntax is different on the client than
on the server. JScript is used on the client. On
the server, the language you have specified is
used. Ex: e-mail, Zip Code, Country
Code, Phone Number Etc.

19


The CustomValidator control allows you to
write a method to handle the validation of the
value entered.



This control helps in implementing user
defined validations .



To Do this you have to write the user defined
function in the head section in <script> tag
20


Properties


BackColor



ClientValidationFunction :- Specifies the name of the
client-side validation script function to be executed. The
script must be in a language that the browser supports,
such as VBScript or JScript
 With VBScript, the function must be in the form:
 Sub FunctionName (source, arguments)

 With JScript, the function must be in the form:
 Function FunctionName (source, arguments)
21












ControlToValidate
Display
EnableClientScript
Enabled
ErrorMessage
ForeColor
Id
OnServerValidate:- Specifies the name of the
server-side validation script function to be
executed
RunAt
Text
22




Used to display a summary of all validation
errors occurred in a Web page.
Error message displayed in this control is
specified by the ErrorMessage property of each
validation control. If the ErrorMessage
property of the validation control is not set, no
error message is displayed for that validation
control.

23


Properties
Display Mode:- How To Display The Summary.
Values are BulletList, List, SingleParagraph
 EnableClientScript
 Enabled
 ForeColor
 HeaderText:- A header in the ValidationSummary
control
 Id
 RunAt


24


ShowMessageBox:-

A

Boolean

value

that

specifies whether the summary should be
displayed in a message box or not.


ShowSummary:- A Boolean value that specifies
whether the ValidationSummary control should
be displayed or hidden

25


The

BaseValidator

Class: The validation

control classes inherit from the BaseValidator
class and inherit its properties and methods.

Therefore, it would help to take a look at the
properties and the methods of this base class,
which are common for all the validation
controls:
26










ControlToValidate
Display
EnableClientScript
Enabled
ErrorMessage
Text
SetFocusOnError:- It indicates whether in case
of an invalid control, the focus should switch to
the related input control.
ValidationGroup
27




www.msdn.microsoft.com
www.w3schools.com
Asp.Net By Bible

28
29

Más contenido relacionado

La actualidad más candente

Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controlsRaed Aldahdooh
 
State Management in ASP.NET
State Management in ASP.NETState Management in ASP.NET
State Management in ASP.NETShyam Sir
 
Content provider in_android
Content provider in_androidContent provider in_android
Content provider in_androidPRITI TELMORE
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Gil Fink
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web ApplicationRishi Kothari
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE IntroductionAhllen Javier
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3Jamshid Hashimi
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web ArchitectureChamnap Chhorn
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state managementpriya Nithya
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptFahim Abdullah
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.Ni
 

La actualidad más candente (20)

ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Web api
Web apiWeb api
Web api
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
State Management in ASP.NET
State Management in ASP.NETState Management in ASP.NET
State Management in ASP.NET
 
Javascript
JavascriptJavascript
Javascript
 
Content provider in_android
Content provider in_androidContent provider in_android
Content provider in_android
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
Html form tag
Html form tagHtml form tag
Html form tag
 
2. HTML forms
2. HTML forms2. HTML forms
2. HTML forms
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Html forms
Html formsHtml forms
Html forms
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
Html forms
Html formsHtml forms
Html forms
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 

Similar a Asp.Net Validation Controls Guide

Similar a Asp.Net Validation Controls Guide (20)

Validation controls ppt
Validation controls pptValidation controls ppt
Validation controls ppt
 
Validation in asp.net
Validation in asp.netValidation in asp.net
Validation in asp.net
 
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
 
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
 
2310 b 07
2310 b 072310 b 07
2310 b 07
 
Asp.net validation
Asp.net validationAsp.net validation
Asp.net validation
 
Chapter 3 (validation control)
Chapter 3 (validation control)Chapter 3 (validation control)
Chapter 3 (validation control)
 
ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10
 
Validation controls ASP .NET
Validation controls ASP .NETValidation controls ASP .NET
Validation controls ASP .NET
 
Validation controls in asp
Validation controls in aspValidation controls in asp
Validation controls in asp
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Introduction to validation
Introduction to validationIntroduction to validation
Introduction to validation
 
validation
validationvalidation
validation
 
Project1 CS
Project1 CSProject1 CS
Project1 CS
 
Project1 VB
Project1 VBProject1 VB
Project1 VB
 
validation of aap.net
validation of aap.netvalidation of aap.net
validation of aap.net
 
Controls in asp.net
Controls in asp.netControls in asp.net
Controls in asp.net
 
Introduction to Custom Form Control
Introduction to Custom Form ControlIntroduction to Custom Form Control
Introduction to Custom Form Control
 
validations in asp .net
validations in asp .netvalidations in asp .net
validations in asp .net
 
LAYERS asp.net ppt
LAYERS asp.net pptLAYERS asp.net ppt
LAYERS asp.net ppt
 

Último

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Último (20)

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

Asp.Net Validation Controls Guide

  • 2.  Validation:- (valid data)    Check User Input Against a Set of rules Validation Type:  Client Side Validation Server Side Validation 2
  • 3.  Asp. Net Provides Some validation controls . These Controls are similar to other common controls and can be used in the same way.  A Validation server control is used to validate the data of an input control. If the data does not pass validation, it will display an error message to the user 3
  • 4. The syntax for creating a Validation server control is: <asp:control_name id="some_id" runat="server" /> 4
  • 5.  Required Field Validator  Compare Validator  Range Validator  Regular Expression Validator  Custom Validator  Validation Summary 5
  • 6.  Compare Validator :-Compares the value of one input control to the value of another input control or to a fixed value.  Required Field Validatior :-Makes an input control a required field.  Range Validator :-Checks that the user enters a value that falls between two values 6
  • 7.  Regular Expression Validator :-Ensures that the value of an input control matches a specified pattern  Custom Validator :-Allows you to write a method to handle the validation of the value entered  Validation Summary:-Displays a report of all validation errors occurred in a Web page 7
  • 8.  Used to make an input control a required field.  Validation fails if the input value does not change from its initial value. By default, the initial value is an empty string ("").  Leading and trailing spaces of the input value are removed before validation.  The InitialValue property does not set the default value for the input control. It indicates the value that you do not want the user to enter in the input control. 8
  • 9.  Properties BackColor  ControlToValidate:- id of Control  Display:- None, Static, Dynamic  EnableClientScript:- Boolean value  Enabled: Bololean Value  ErrorMessage: The text to display in the ValidationSummary control when validation fails. This text will also be displayed in the validation control if the Text property is not set  9
  • 10.  ForeColor  Id :-A unique id for the control  InitialValue :- Specifies the starting value of the input control. Default value is "“  Runat:- Specifies that the control is a server control. Must be set to "server"  Text:- The message to display when validation fails 10
  • 11.  Used to compare the value of one input control to the value of another input control or to a fixed value.  If the input control is empty, the validation will succeed. We can use the RequiredFieldValidator control to make the field required. 11
  • 12.  Properties :  BackColor ControlToCompare :- The name of the control to compare with  ControlToValidate :- The id of the control to validate  Display:- None ,Static , Dynamic  EnableClientScript :- Boolean value  Enabled:- A Boolean value that specifies whether the validation control is enabled or not 12
  • 13.  ErrorMessage  ForeColor  Operator:-. The type of comparison to perform. The operators are : Equal, GreaterThan, GreaterThanEqual, LessThan, LessThanEqual, NotEqual, DataTypeCheck  Runat  Text  Type :- Specifies the data type of the values to compare. The types are: Currency,Date,Double,Integer,String,  ValueToCompare :-A specified value to compare with 13
  • 14.  Used to check that the user enters an input value that falls between two values.  Possible to check ranges within numbers, dates, and characters.  Validation will not fail if the input control is empty. Use the RequiredFieldValidator control to make the field required.  Validation will not fail if the input value cannot be converted to the data type specified. Use the CompareValidator control, 14
  • 15.  Properties BackColor  ControlToValidate  Display:- None, Static, Dynamic  EnableClientScript  Enabled  ErrorMessage  ForeColor  id  15
  • 16.  MaximumValue:- Specifies the maximum value of the input control  MinimumValue:- Specifies the minimum value of the input control  RunAt  Type:-Specifies the data type of the value to check. The types are: Currency, Date, Double, Integer, String  Text:- The Message to be display when validation fails, 16
  • 17.  Used to ensure that an input value matches a specified pattern.  Both server and client-side validation are performed unless the browser does not support client-side validation or the EnableClientScript property is set to false.  Validation will not fail if the input control is empty. Use the RequiredFieldValidator control to make the field required. 17
  • 19.    RunAt Text ValidationExpression:-Specifies the expression used to validate input control. The expression validation syntax is different on the client than on the server. JScript is used on the client. On the server, the language you have specified is used. Ex: e-mail, Zip Code, Country Code, Phone Number Etc. 19
  • 20.  The CustomValidator control allows you to write a method to handle the validation of the value entered.  This control helps in implementing user defined validations .  To Do this you have to write the user defined function in the head section in <script> tag 20
  • 21.  Properties  BackColor  ClientValidationFunction :- Specifies the name of the client-side validation script function to be executed. The script must be in a language that the browser supports, such as VBScript or JScript  With VBScript, the function must be in the form:  Sub FunctionName (source, arguments)  With JScript, the function must be in the form:  Function FunctionName (source, arguments) 21
  • 23.   Used to display a summary of all validation errors occurred in a Web page. Error message displayed in this control is specified by the ErrorMessage property of each validation control. If the ErrorMessage property of the validation control is not set, no error message is displayed for that validation control. 23
  • 24.  Properties Display Mode:- How To Display The Summary. Values are BulletList, List, SingleParagraph  EnableClientScript  Enabled  ForeColor  HeaderText:- A header in the ValidationSummary control  Id  RunAt  24
  • 25.  ShowMessageBox:- A Boolean value that specifies whether the summary should be displayed in a message box or not.  ShowSummary:- A Boolean value that specifies whether the ValidationSummary control should be displayed or hidden 25
  • 26.  The BaseValidator Class: The validation control classes inherit from the BaseValidator class and inherit its properties and methods. Therefore, it would help to take a look at the properties and the methods of this base class, which are common for all the validation controls: 26
  • 27.         ControlToValidate Display EnableClientScript Enabled ErrorMessage Text SetFocusOnError:- It indicates whether in case of an invalid control, the focus should switch to the related input control. ValidationGroup 27
  • 29. 29