Wednesday, March 21, 2012

Atlas problems... what versions support on add_pageLoaded hook?

I've inherited a large-ish project that uses a late version of Atlas (not ASP.NET AJAX)

The version in the javascript file headers is 2.021006.A

My problem is I need to hook in a global "Please Wait" message on all Postbacks and Submits.

Hooking into the Form.onSubmit is no problem, and the "Please Wait" message is normally cleared by the page reloading.

However the project uses quite a lot of UpdatePanels and ModalPopUpExtenders. These don't clear the message after a callback (as the page isn't reloaded)

A quick google found a simple solution - Including something like...

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(clearPleaseWait);

..in the Master Page should do most of what I want.

Unfortunately I can't see aPageRequestManager object!Sys andWebForms are there, but there's only 2 properties ofWebForms, one of which is_PageRequestManager which doesn't have any properties of its own.

So, the questions are...

Does the ATLAS version I'm using support/expose PageRequestManager events?Is there still any documentation anywhere for this version?If No and No, is there a workaround for what I'm trying to do?Or have I got to bite a considerably sized bullet and upgrade to ASP.NET AJAX?

Thanks in advance for any much-needed help!!

If it was a pre-beta release, things were done a lot different. We had a few sites that used Atlas or ASP.NET Ajax for a little over a year now, and we had a lot of things that had to be rewritten to work with the beta and newer releases. Most standard server controls for it worked fine, but all our custom stuff had to be rewritten. There may be someone on here that might have some limited documentation somewhere. Most of the documentation was all online and pulled whenever a new release came out.

Does the version your have contain a UpdateProgress control? You may be able to use one in the master page that would work for all the pages that use it. That should display a message during asyncpostbacks and callbacks. I haven't done a lot with the behind the scenes parts of ATLAS or ASP.NET Ajax because it doesn't usually require you to unless you are really fine tuning things, which could be a good and bad thing...

If you do have to upgrade to the newest release now, you may want to run a copy of the site to make changes to while upgrading because that can take some time...

No comments:

Post a Comment