AJAX Update Pannel

  • Thread starter Thread starter Andrew Robinson
  • Start date Start date
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,
 
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
}
 
Back
Top