Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Ignore multiple post-back requests from ajax extender controls

Posted on 2009-02-23
Medium Priority
Last Modified: 2013-11-07
I have an asp.net 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

guru_sami earned 1000 total points
ID: 23713841
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

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

564 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