By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,078 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Apr 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jon
hello,

if isValid is false, the server side code should never fire?

"Stuart Whiteford" wrote:
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.

Apr 24 '06 #2

P: n/a
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.
"Jon" <Jo*@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
hello,

if isValid is false, the server side code should never fire?

"Stuart Whiteford" wrote:
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.

Apr 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.