Server-side events do not fire the first time after client-side validators have fired

S

Stuart Whiteford

Hi,

I asked this back in January without answer and forgot about it until now.

I've got a basic web form, two textboxes, a couple of radio button groups,
some required field validators, and a Submit and Cancel button.

When the page loads, if I click the Cancel button, the server-side event
fires as normal.

However, if I click the Submit button (with no information entered) the
client-side validators fire, but if I then decide to press the Cancel
button, nothing happens, I need to press it a second time before the
server-side event fires.

I've now noticed that no server-side events fire the first time after the
client-side validation has fired. Not so much of a problem with a Cancel
button, but a nightmare for DropDownLists with AutoPostBack enabled!

TIA,
Stuart.
 
S

Stuart Whiteford

Hi,

It's not the server code that would fire if the page was valid, it's any
server-side code on the page.

Once the validator have fired client-side, I then go and change a
DropDownList with AutoPostBack enable, and the PostBack does not happen (the
CausesValidation is false on the DropDownList).

Stuart.
 

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