Ignore multiple post-back requests from ajax extender controls

Posted on 2009-02-23
Last Modified: 2013-11-07
I have an page where i have used ajax extenders for cosmetic purposes.  The page draws a table after querying a sql back-end for data so there is about a 2 or 3 second delay while the page is served after the click event.
What happens is that the ajax controls (which are set to auto-post back) send the quest to the server, but if the user gets impatient and clicks the control twice, it looks like all additional requests are also sent to the server then when the page is re-drawn, there are two versions of the table being drawn.   The code to draw the table is fired based on the selected index changed or checkchanged events of controls with ajax extenders.

So my question is - how can i accept the post-back of the first control then ignore any additional clicks until the page is served back to the client?
Question by:exrescueswimmer
    LVL 41

    Accepted Solution

    I think you have to use PageRequestManager's InitializeRequest Event ... for this.
    Here you can check if an async-Postback is alreaady in progress and cancel any further request.
    Also disable the button / control that is causing postback

    then enable the button on endRequest Event.

    Check Following documentation:

    Author Closing Comment

    I haven't hammered out my code yet but this is definately the way to go.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now