How is it possible to call a client side javascript method after a specific update panel has been loaded?
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler) does not work for me because this will fire after ANY update panel finishes loading, and I can find no client side way to find which is the one
ScriptManager.GetCurrent(Page).AsyncPostBackSourceElementID AsyncPostBackSourceElementID does not work for me as this is a server side object, and i want Client Side
The ClientSide .Net framework must know which UpdatePanel it is updating in order to update the correct content. Surely there is a way to hook into this event?
Any help would be appreciated.
You can hook the PageRequestManager.beginRequest event and inspect the BeginRequestEventArgs.postBackElement property.
Note that it doesn’t really give you the UpdatePanel, but the control inside of the UpdatePanel. That should be good enough, though.
Edit: Even better, the PageRequestManager.pageLoaded event gives you PageLoadedEventArgs.panelsUpdated (and panelsCreated) properties.