How to get Id update panel that initial a request in javascript

半世苍凉 提交于 2019-12-01 11:22:48

You can use the get_updatePanelsToUpdate that return an array with the Ids of the UpdatePanels that will be going to updated.

<script>
    window.onload = function() {
        var prm = Sys.WebForms.PageRequestManager.getInstance();

        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);
    };

      function InitializeRequest(sender, args) 
      {     
         // get the array of update panels id
         var UpdPanelsIds = args.get_updatePanelsToUpdate();
         // get the Post ID
         args.get_postBackElement().id;
      }

      function EndRequest(sender, args) {
      }
</script>

http://msdn.microsoft.com/en-us/library/ee224805.aspx

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