BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Handle Multiple Postbacks with AspQ

Handle Multiple Postbacks with AspQ

This item in japanese

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
Style

BT