Chain UpdatePanel requests

  • : Function split() is deprecated in /hsphere/local/home/guruj/guruj.net/modules/filter/filter.module on line 1200.
  • : Function split() is deprecated in /hsphere/local/home/guruj/guruj.net/modules/filter/filter.module on line 1200.

ASP.NET AJAX has some pretty nifty features, but one of the nicest is the UpdatePanel, which allows coders to easily set up partial-page refreshes through XMLHttpRequest, and from what I can see it has good cross-browser support.

However, one thing I always wanted to do was chain UpdatePanels together so that (for example) a number of server-side requests could be fired off, with the user status being updated appropriately.

This took me ages to figures out, but it's actually very simple. Just call _doPostBack with the event you wish to trigger, and wrap the call in setTimeout. For example:

setTimeout("Sys.WebForms.PageRequestManager.getInstance()._doPostBack('Button2', '')", 0);

View full example

Prerequisites for this example: