AJAX Update Pannel

A

Andrew Robinson

I need to update a value outside of an update pannel from within code that
originates inside of an update panel. Any way to make this happen?

Specifically I have a status bar inside of a master page that needs to get
updated after certain operations that are currently wrapped inside of an
update pannel. This update does not need to be done async but currently,
changes to the status bar are being lost.


Thanks,
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

You can use the Page Request Manager's EndRequestHandler event to execute
some custom JavaScript after an AJAX call has completed.
So something along these lines should do it:

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args)
{
$get("MyStatusBarDiv").innerText =
$get("MyHiddenTextBoxFromInsideTheUpdatePanel").innerText
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top