Problem with Multiple Validation Controls and one Form Tag.

Discussion in 'ASP .Net' started by Avad, Dec 4, 2003.

  1. Avad

    Avad Guest

    I have a following screen. The login is a "user control" with validations controls in it. This side I have address book in which "name" is required field. But when I click on "add new user" the validations controls of the login also gets fired. I want that if "add new user" button is clicked it should only fire validation control assign for name field and not login validations and if I click "login" button it should fire login validation controls only and not validation control of name field. How can I do this? Any clues.

    Please find attached word document for a screen shot.

    Regards,
     
    Avad, Dec 4, 2003
    #1
    1. Advertising

  2. Avad

    Jagan Mohan Guest

    Loop through the Validators collection of the page and disable the
    unneccessary Validators.

    Page.Validators[3].Enabled = false;

    Once this is set that particular validator won't fire.

    But the only disadvantage is that the Validator Collection can only be
    accesed though int Index.

    Thanks,
    Jagan Mohan
    MCP

    "Avad" <AVad> wrote in message
    news:%...
    I have a following screen. The login is a "user control" with validations
    controls in it. This side I have address book in which "name" is required
    field. But when I click on "add new user" the validations controls of the
    login also gets fired. I want that if "add new user" button is clicked it
    should only fire validation control assign for name field and not login
    validations and if I click "login" button it should fire login validation
    controls only and not validation control of name field. How can I do this?
    Any clues.

    Please find attached word document for a screen shot.

    Regards,
     
    Jagan Mohan, Dec 4, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    840
    John C. Bollinger
    Jan 27, 2006
  2. loveNUNO
    Replies:
    2
    Views:
    926
    loveNUNO
    Nov 20, 2003
  3. André
    Replies:
    2
    Views:
    738
    André
    Jun 23, 2008
  4. bnp
    Replies:
    4
    Views:
    328
  5. jmp
    Replies:
    6
    Views:
    189
    Dag Sunde
    Jun 8, 2006
Loading...

Share This Page