|
| ||||||||||
| Tags: isvalid property, netscape, server, validation, validator control |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| The IsValid property of the Validator Controls
|
|
#2
| |||
| |||
| Re: The IsValid property of the Validator Controls
ASP.NET provides us with a set of controls to validate the data entered on a form. This group is called "Validator Controls." Among the most popular are the RequiredFieldValidator control, which performs the task of checking if a certain field is present or not in the text. All these controls inherit from the base class BaseValidator, which exposes methods and properties useful for the validation of form and display any error messages on the page. |
|
#3
| ||||
| ||||
| Re: The IsValid property of the Validator Controls
The validation control of these objects is done by either the client side (via javascript) and server side. But what if there are pages where these controls are visited in a browser that does not support javascript? Simple, client-side validation is not performed! That the server side, however, continues to operate. Therefore always advisable to use the IsValid property of the Page class, before the operations on that data read from the form. |
|
#4
| |||
| |||
| Re: The IsValid property of the Validator Controls
Little example that shows how to use the controls RequireFieldValidator, RangeValidator, ValidationSummary a little simple script! These controls allow you to display text when a (the) client input is inaccurate or missing .... RequireFieldVal idator => Used to display text if no user input is input. After inserting it you just change two properties for it is now active. 1. ControlToValidate -> Champ controlling eg TextBox 2. ErrorMessage -> Text to be displayed eg this input field compulsory RangeValidator => enable it to check if the DS before it is understood and determined a range display a message if it is not the case! 1. ControlToValidate -> TextBoxNombre 2. ErrorMessage -> Must be an integer between 0 and 10 for example MinimumValue 3 -> 0 MaximumValue 4 -> 10 Type 5 -> Integer (other choices available) ValidationSummary => ValidationSummary can summarize the error messages of all controls Validation of a web page at one location. The summary can be displayed form of a list, a list bulleted or paragraph, depending on the value of the property DisplayMode. If you do nothing the DS to this script textbox it will display a message error. Similarly if you enter an integer greater at 10 the second ds Testbox you display an error message. Just place it on the form and set it up ...! |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "The IsValid property of the Validator Controls" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Validator issue in Adobe CS5 | Jesus2 | Windows Software | 5 | 15-07-2010 01:46 AM |
| Want to know about CSE HTML Validator Lite | Carlos16 | Windows Software | 4 | 10-03-2010 09:05 AM |
| How to define HTML Validator and services provided by HTML Validator | Aldous | Software Development | 3 | 22-09-2009 01:12 PM |
| Searching for struts validator tutorial | fldrice | Software Development | 2 | 31-07-2009 10:44 PM |
| CSS (Cascading Style Sheets) Validator | Rebella | Software Development | 2 | 15-04-2009 10:02 AM |