How to call a client side javascript function after a specific UpdatePanel has been loaded

后端 未结 3 594
囚心锁ツ
囚心锁ツ 2020-12-07 15:18

How is it possible to call a client side javascript method after a specific update panel has been loaded?

Sys.WebForms.PageRequestManager.ge

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 15:38

    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.

提交回复
热议问题