- ValidationSummary control can be configured to display Pop-up error messages incase of invalid data.
- Page class contains a Validators collection containing all the validation controls put into it.
- Similarly, it contains the Validate( ) method which checks to see if data is valid on the page control. This method automatically runs after Page_Load( )
- We may use Page.IsValid property at any time during event handling to see if Page is still valid on the server.
- Client validation is by default enabled for all user controls. Use EnableClientScript to turn it off.
- To set the Focus on a particular control, use Focus( ) method.
- SetFocusOnError property on validation control ensures that the user does not leave the control until entered data is valid. This is set to false by default.
- If we wish to have a control bypass validation checks on page (and cause Postback) we may use its CausesValidation property.
- ValidationGroup property allows to treat set of validation control on a page as a group, so that if a Postback occurs only for that validation group, only controls within that group would be validated.
- The InitialValue property of the RequiredFieldValidator is used to define a value that we may have set as 'Default Value/Text' on a given control to suggest that this value must be changed by the user.
- CompareValidator may be used to compare a control values against a given constant. Or it may simply be used to check that the data entered in a given control belongs to a specific data type. Set Operator property to DataTypeCheck in that case.
Showing posts with label Focus. Show all posts
Showing posts with label Focus. Show all posts
Monday, September 21, 2009
Chapter 3-Lesson 1
Labels:
CompareValidator,
Focus,
RequiredFieldValidator,
Validation
Subscribe to:
Posts (Atom)