Problem with Multiple Validation Controls and one Form Tag.

  • Thread starter Thread starter Avad
  • Start date Start date
A

Avad

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,
 
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
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,
 
Back
Top