Is asp.net buffering button clicks???

Discussion in 'ASP .Net Web Controls' started by rickm, Jan 1, 2004.

  1. rickm

    rickm Guest

    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
    rickm, Jan 1, 2004
    #1
    1. Advertising

  2. Rick,

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

    Jim Cheshire, MCSE, MCSD [MSFT]
    Microsoft Developer Support
    ASP.NET


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

    --------------------
    >From: (rickm)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    >Subject: Is asp.net buffering button clicks???
    >Date: 1 Jan 2004 08:59:26 -0800
    >Organization: http://groups.google.com
    >Lines: 17
    >Message-ID: <>
    >NNTP-Posting-Host: 63.227.210.9
    >Content-Type: text/plain; charset=ISO-8859-1
    >Content-Transfer-Encoding: 8bit
    >X-Trace: posting.google.com 1072976367 26368 127.0.0.1 (1 Jan 2004

    16:59:27 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Thu, 1 Jan 2004 16:59:27 +0000 (UTC)
    >Path:

    cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
    phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!fr.ip.nds
    oftware.net!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.max
    well.syr.edu!postnews1.google.com!not-for-mail
    >Xref: cpmsftngxa07.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webcontrols:17158
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    >
    >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
    >
    Jim Cheshire [MSFT], Jan 2, 2004
    #2
    1. Advertising

  3. rickm

    rickm Guest

    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
    rickm, Jan 3, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Smith Jr.

    Problem with missing button clicks

    John Smith Jr., Dec 12, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    372
    John Smith Jr.
    Dec 14, 2003
  2. Paul Hodgson
    Replies:
    3
    Views:
    507
  3. Klaus Jensen
    Replies:
    1
    Views:
    358
    Klaus Jensen
    Apr 26, 2005
  4. Mossman
    Replies:
    1
    Views:
    506
    cbDevelopment
    Dec 12, 2005
  5. PontiMax

    Clicks and double-clicks

    PontiMax, Jul 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    176
    Eliyahu Goldin
    Jul 14, 2004
Loading...

Share This Page