Results 1 to 4 of 4

Thread: The IsValid property of the Validator Controls

  1. #1
    Join Date
    Jan 2011
    Posts
    42

    The IsValid property of the Validator Controls

    I am having a client computers that are using Netscape 4.X, which seems to ignore all validator controls such as RequiredFieldValidator. To pact with this matter, I write server side code that makes sure that the IsValid property is true for every validator control. To mechanize this a bit, and reduce writing this code on every page of an application that need this, I was hopeful to iterate through every Validator controls and recognize if the IsValid property is True for all. Though, I am not capable to pull this off. Any Suggestions?

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    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. #3
    Join Date
    May 2009
    Posts
    637

    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. #4
    Join Date
    May 2009
    Posts
    543

    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 ...!

Similar Threads

  1. Validator issue in Adobe CS5
    By Jesus2 in forum Windows Software
    Replies: 5
    Last Post: 15-07-2010, 01:46 AM
  2. Replies: 3
    Last Post: 22-09-2009, 01:12 PM
  3. Searching for struts validator tutorial
    By fldrice in forum Software Development
    Replies: 2
    Last Post: 31-07-2009, 10:44 PM
  4. CSS (Cascading Style Sheets) Validator
    By Rebella in forum Software Development
    Replies: 2
    Last Post: 15-04-2009, 10:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,237,237.82038 seconds with 17 queries