Is asp.net buffering button clicks???

R

rickm

I was under the impression that each button click would synchronously
kick off the process of creating a new page class, handling the event,
and re-rendering the page. But....

1. I have a form with 1 <asp:button>
2. button_click event writes timestamp to file and sleeps 20 seconds

If I press the button 3 times quickly, the page takes about minute to
load, and the timestamps in the file are 20 seconds apart.

Reading threads about handling button clicks when a previous click
takes a while (i.e. going to a DB) led me to believe they are fired
off and handled immediately.

Are button clicks buffered or processed immediately???????

Thanks in advance
 
J

Jim Cheshire [MSFT]

Rick,

Unless you spawn a new thread, your code will execute synchronously.

Jim Cheshire, MCSE, MCSD [MSFT]
Microsoft Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
 
R

rickm

Thanks for the response Jim,

It looks like that is exactly what happens when session state is
disabled in the web.config file. A new thread is kicked off and the
event handlers are executed immediately regardless what the previous
events are doing.


~Rick
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top