Cancel button needs two clicks after validators have fired

Cancel button needs two clicks after validators have fired

Post by Stuart Whi » Tue, 10 Jan 2006 20:46:26

Hi,

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.

Not a major deal I know, but if it annoys me, it'll probably annoy at least
one other user.

TIA,
Stuart.

 
 
 

1. How do I prevent the validators firing when a button is clicked?

2. How could fire both TextChanged event and button click if button is clicked

I am using ASP.NET. I have 3 web server controls on my page. One is
textbox1 with AUTOPOSTBACK = true. The other one is another textbox2
with AUTOPOSTBACK = false. The third item is a save button.

Now, I want whenever textbox1 changes, system automatically fills in
value in textbox2. If user click on button, then system SAVE
information into database.

Now my problem is if when user change text in textbox1, instead of move
cursor ro anywhere else, he click on SAVE button. So the system will
fire page autopostback and fill in value in textbox2 but will not SAVE
this information. I do want to save the information when user click on
SAVE.

I understand that there is one one action server could response to
this. Is there anyway I could detect that user click on button instead
of moving cursor out of textbox1 area?

Thanks in advanced,
Dean

3. change of session does not fire button click event for second time

4. change of session does not fire button click event for second

5. Button Click Event fired on second press?

6. change of session does not fire button click event for second time

7. Server.Transfer in User Control only fired on second click on button

8. Need a way to know (fire event) when user click New Mail Button in Outlook2000/2

9. When user press F5 after a button click event, the click event fires again!

10. Required field validators - button event does not fire

11. How do I prevent the validators firing when a button is clicke

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

13. Apply, cancel, ok buttons not firing

14. email button needs two clicks

15. required field validators and not validating until submit button clicked