asp button click handler

P

Peter Kirk

Hi

if I have an asp:button with runat=server, when it is clicked the code
behind (onclick handler) is called. If the onclick function is a long time
running, does the button wait until the handler is finished until it can be
clicked again? Or can I risk that a user can cause two executions of my
onclick handler to be executing at the same time?

Thanks,
Peter
 
P

Peter Kirk

I do a lot of updates in a database when the user clicks the button. It
could take maybe 1 - 1½ seconds before completing.

But sometimes I am seeing double updates if I click rapidly many times on
the button. It appears that Internet Explorer can send mulitple requests
from the same browser "simultaneously". That is, it does not wait for the
server to complete the onclick handler before allowing the handler to fire
again.

Peter

Alvin Bruney - ASP.NET MVP said:
client first, then server sequentially. why do you have this long
processing
on the client?

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Peter Kirk said:
Hi

if I have an asp:button with runat=server, when it is clicked the code
behind (onclick handler) is called. If the onclick function is a long
time
running, does the button wait until the handler is finished until it can be
clicked again? Or can I risk that a user can cause two executions of my
onclick handler to be executing at the same time?

Thanks,
Peter
 

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,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top