Groups | Blog | Home
all groups > asp.net > february 2006 >

asp.net : Limit execution of custom validator?



Tarun Mistry
2/20/2006 10:34:30 PM
Hi there everyone, I have a page containing dynamic user controls. The main
page contains a custom validator that checks the dynamic user controls, this
works fine.

However, I only want the custom validator to fire when the main submit
button on the page is executed, not the ones within the user control.

Is this possible at all? Right now the custom validator executes whenever
any submit button is pressed which is not allowing the user to enter all the
information they need.

Thanks for all your help,
Taz

z f
2/21/2006 12:00:00 AM
when i did this once, i had to manipulate a comma seperated list of the IDs
of the validators that I wanted to make the validation.
the Javascript variable is Page_Validators it is internal ASP.NET list of
the validation control. (look in the view source of the client side HTML)
maintain a variable to hold the original value before manipulation so you
can restore the the default validation of the page.
good luck.


[quoted text, click to view]

AddThis Social Bookmark Button