Is there a way to detect when an update panel is done refreshing?

ⅰ亾dé卋堺 提交于 2019-12-11 07:28:09

问题


Is there a way to detect when an update panel is done refreshing? I want to fire some javascript methods when the update panel is finished.

Perhaps via the UpdateProgress control?


回答1:


You can use:

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function EndRequestHandler(sender, args) {
   // do what you want here
}

Of course, this will caputure every AJAX EndRequest call so you'll have to make your EndRequestHandler function see what has been requested or play with BeginRequestHandler. More info here.



来源:https://stackoverflow.com/questions/456195/is-there-a-way-to-detect-when-an-update-panel-is-done-refreshing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!