On Wed, 25 May 2005 11:58:48 -0500, Jo Inferis
<jo@inferis.NOSPAM.gotadsl.co.uk> wrote:
For reasons that are unlikely to become clear at the moment, I have a
page
with some validation controls on it which opens a dialog. The dialog does
*stuff* and then closes with a call to :
parent.document.forms[0].submit();
Unfortunately, this fires off all the validation controls on the page,
and
I'd rather it didn't.
Any ideas how I can submit the form programmatically without firing the
validation events?
thanks in advance,
--
jo inferis
You can disable validators on the client-side via JS. If you look in the
web UI validation JS file, which is located somewhere like:
C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_43 22
if you're using 1.1, there's a function in there called ValidatorEnable
that you can call to disable validators. I don't remember if there's a
'disable all' call you can make, or if you have to do one by one. Check
it out if interested....
Note doing it this way will not affect the Page.IsValid check from running
all active validators on the server side as well. Because the Enabled
property for each is in the viewstate and JS doesn't touch or affect that.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET