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

Forum statistics

Threads
473,772
Messages
2,569,591
Members
45,103
Latest member
VinaykumarnNevatia
Top