BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Handle Multiple Postbacks with AspQ

by Anand Narayanaswamy on Oct 25, 2012 |

AspQ is a small JavaScript object that plug into the ASP.NET JavaScript and AJAX runtimes and is released to handle multiple postbacks, which the .NET Framework doesn't provide. It queues all sync and async postback requests without causing any interference and applies the updates in event order.

Several developers have released various server-side and client-side implementations to deal with multiple postbacks. But as a developer, you need to have deep domain knowledge to understand the implemented solutions.

You can work with AspQ in two different ways after downloading the source JavaScript file (AspQ.js) and saving it in your site's script directory. First include the code displayed below

script type="text/javascript" src="AspQ.js"></script>

Add the following server-side code in your OnInit method of the System.Web.UI.Page

form runat="server" onsubmit="return AspQ.submit(this)">

The developer has provided another implementation for working with AspQ on the official project site and on his blog.

I released AspQ because there wasn't a drop-in solution addressing the problem of multiple postbacks for ASP.NET. You probably won't see performance improvements using AspQ, except perhaps in your user's workflow because they no longer have to wait for one async postback to complete before continuing to work, said Sandro Magi, Developer, AspQ.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT