7} Validation Summary Control:-

  • 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
Properties with Validation Summary Control:-

1)DisplayMode

2)ShowMessageBox

3)ShowSummary

4)ValidationGroup

1)DisplayMode:- 
  • Used to set or get a value that Indicates in which format error messages should be displayed.
2)ShowMessageBox:-
  • When set to “True” Error Message will be displayed with the Alert Box.
  • When set to “False” Error Message will not be displayed with the Alert Box.
3)Show Summary:-
  • When set to “True” Error Messages are Displayed within the Webpage
  • When set to “False” Error Messages are Displayed within the Webpage
Example with validationSummary 
 
Create a new WebPage

Design the WebPage


Set the following Properties for RequiredFieldValidator1:-

     ID                                   ---      RF1

     ControlToValidate            ---                txtUName

     ErrorMessage                  ---                Enter UserName

     Text                                ---                *

Set the following Properties for RequiredFieldValidator2:-

     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