Problem with Multiple Validation Controls and one Form Tag.

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,
 
J

Jagan Mohan

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,
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top