Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Server-side events do not fire the first time after client-side validators have fired

Reply
Thread Tools

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

 
 
Stuart Whiteford
Guest
Posts: n/a
 
      04-24-2006
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.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9u?=
Guest
Posts: n/a
 
      04-24-2006
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.
>
>
>

 
Reply With Quote
 
 
 
 
Stuart Whiteford
Guest
Posts: n/a
 
      04-25-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
events won't fire first time ton ASP .Net 0 11-05-2010 03:02 PM
Embedded <divs> with events: How to prevent the parent div's eventfrom being fired when the embedded div's event is fired? Num GG Javascript 2 11-17-2008 08:56 PM
Cancel button needs two clicks after validators have fired Stuart Whiteford ASP .Net 0 01-09-2006 11:46 AM
Disable submit button after click but fire validators? Chris Ashley ASP .Net 1 12-16-2005 11:39 AM
Regular Expression validators NOT working, Required Field validators ARE working Ratman ASP .Net 0 09-14-2004 09:36 PM



Advertisments