If the user types an invalid input character, no replacement occurs, but instead a beep is issued if the Beep On Error property is set to true, and the Mask Input Rejected event is raised.
You can provide your own custom error logic by handing this event.
For answers to these questions, read Develop your own Web Accounting Application Using ASP .
Net 2.0 Using validation controls, we can perform the following validations.
After all validation tests in a form have been passed, the Is Valid property on the page is set.
If any of the validation fails, the entire page is set to invalid.
The important properties of the Required Field Validator Control are: Text : Sets the error message displayed by the control.
Control To Validate : Specifies the ID of the control that you want to validate.
For each specific type of validation, there is s specific validation control available in the . The common validation controls we use in a webform are: The Required Field Validator Control checks whether the user has entered any data in a field.
When the the form is submitted and the user's input is processed, the framework transmits the data entered in a control to the associated validation control.
The validation control tests the data and sets the Is Valid property to indicate whether the data qualifies to be passed.
Is Valid : Has the value True when the validation succeeds.
In the following example, using of validation controls is shown for a form which has two textbox controls and one button.
Before saving the data entered by the user into a webform, we will have to validate the data.