Stopping client side event validation

P

Paul

Hi all,

I've been trying unsuccessfully to stop client side event validation.
I've created a simple page with a text box, a required field validator
and a server button with the following settings:

1. <pages enableEventValidation="false"> in web.config
2. EnableClientScript="false" in the required field validator.
3. EnableEventValidation="false" in the Page directive (which, I know,
is not necessary).

I can programmatically check the web.config setting and it is correctly
set to "false".

Whenever the validator is on the form, it generates all of the extra
javascript (the onclick for the button, and the __EVENTTARGET and
__EVENTARGUMENT hidden inputs).

Is there anything I'm missing here? I just want to have server-side
validation without the client script but there doesn't appear to be an
easy way to turn this off.

Any help would be much appreciated.

Thanks,

Paul
 
G

Grant Merwitz

using EnableClientScript="false" will turn off a required validators client
side validation.
this will now be handled server side.

I think you are testing this locally, and confusing the speed of a local
callback with client side validation.

try add a System.Threading.Thread.Sleep(2000) in your page load and see if
there's a difference between EnableClientScript="false" and
EnableClientScript="true"
 
P

Paul

Hi Grant,

I have this set to false, but it still emits all of the extra
javascript. If I remove the validator, the javascript doesn't get
emitted.

Any thoughts?

Thanks,

Paul
 
G

Grant Merwitz

oh, so you're worried about the javascript in the page.
I thought you were just trying to deactivate it.

Not sure exactly,
if you remake the page from scratch it should work nicely
Just don't add any validators
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top