How can you tell if a method is being run in UpdatePanel postback?

梦想的初衷 提交于 2019-12-18 11:06:15

问题


How can I tell if a method is running in the context of an AJAX postback (i.e as the result of a UpdatePanel (asynchronous) postback)?

According to egoldin Page.IsAsync is a very common confusion that has absolutely nothing to do with AJAX.

The correct approach is to use ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack.


回答1:


Use ScriptManager.GetCurrent ( Page ).IsInAsyncPostBack



来源:https://stackoverflow.com/questions/265686/how-can-you-tell-if-a-method-is-being-run-in-updatepanel-postback

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