briefly explain how the server control validation


Briefly explain how the server control validation controls work?

A validation control works by evaluating the value of an input server control on the page to see whether it meets certain criteria. The input control to evaluate is specified by the validation controls Control To Validate attribute. You can programmatically cause a validation control to perform its evaluation by calling its Validate method, which sets the validation controlls IsValid property to true if validation succeeds and false if it fails. You can cause all of the validation controls on a page to validate their input controls by calling the Page.Validate method. 

 The Page Is Valid property is set to true if validation succeeds for all validation controls within the page; or else, it's false. The Page.Validate method is automatically invoked when a button control whose CausesValidation property is set to true is clicked. Causes Validation is set to false by default for a reset or clear button. The button click event is suppressed if IsValid is false for any validation control on the page. There are following types of validation controls given by ASP.Net:

1. Required Field Validator

2. Compare Validator

3. Range Validator

4. Regular Expression Validator

5. Custom Validator

These controls are server side controls. Though in up-level browsers that is IE 4.0 and above these can be enabled on client side also.

All these controls have a property called Control to Validate. Required Field Validator ensures data entry into the Control to Validate.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: briefly explain how the server control validation
Reference No:- TGS0310393

Expected delivery within 24 Hours