- This Control cannot be used to perform any kind of Validations.
- Rather this Control is used to display the Error Message of all the Validation Controls that will return False
1)DisplayMode
2)ShowMessageBox
3)ShowSummary
4)ValidationGroup
1)DisplayMode:-Example with validationSummary
2)ShowMessageBox:-
- Used to set or get a value that Indicates in which format error messages should be displayed.
- When set to “True” Error Message will be displayed with the Alert Box.
3)Show Summary:-
- When set to “False” Error Message will not be displayed with the Alert Box.
- When set to “True” Error Messages are Displayed within the Webpage
- When set to “False” Error Messages are Displayed within the Webpage
Create a new WebPage
Design the WebPage
Set the following Properties for RequiredFieldValidator1:-
ID --- RF1
ControlToValidate --- txtUName
ErrorMessage --- Enter
UserName
Text --- *
ID --- RF2
ControlToValidate --- txtPassword
ErrorMessage --- Enter
Password
Text --- *
Set the following
Properties for RequiredFieldValidator2:-
ID --- RF3
ControlToValidate --- txtAge
ErrorMessage --- Enter
Age
Text --- *
- Run the Application and Check
No comments:
Post a Comment