Data Validation
Data Validation:-
a. Validation is used to accept the correct data value.
b. There are following validation control which are used in the dot net framework.
I. Reqiredfillvalidated
II. Rangevalidated
III. Regularexpressionvalidated
IV. CompareValidated
V. Validationsummary
v RequiredfillValidated:- it accepts the compulsory data
v Property of requiredfillvalidator
I. Errormessage
II. Controltovalid:- controlid
Q. ) How to configure the validation control?
Ans. All the validation control is configure using (web.config) file.
<appSettings> <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> </appSettings>
Q.)What is web config file?
Ans. The web config file is used to define the various setting and behaviour for your web application.
Q.) What is app setting tags?
Ans. App setting tags is used to set all the validation control property.
III. Rangevalidatercontrol(set the range):- it is used to set the range .
Property of it:-
i. Errormessage
ii. Controltovalidated
iii. Minimumvalue
iv. Maximumvalue
IV. RegularExpressionvalidator:- in this type of validator control is it used to validate various type of users inputs such as email id , mobile, pincode, passwords.
Property of it :-
a) Errormessage
b) Controltovalid
c) Validationexpression
I. comparevalidator :- this control is useed to compare the value to two control
Property of it
a. Errormessage
b. Controltovalidate:-(first control)
c. Controltocompare:-(second control)
II. ValidationSummary:- validation summary control is used to display summary of all validation error.
property
Comments
Post a Comment