BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Handle Multiple Postbacks with AspQ

| by Anand Narayanaswamy on Oct 25, 2012. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
Style

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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT