Begin and end request in UpdatePanel using jQuery

随声附和 提交于 2019-12-07 11:11:17

问题


How get Method BeginRequest & EndRequest In UpdatePanel?(in jquery)

function onBeginRequest()
{
     //$.blockui;
} 

function onEndRequest()
{ 
     //$.unblockui;
}

回答1:


with(Sys.WebForms.PageRequestManager.getInstance()  ) {
       add_beginRequest(onBeginRequest);
       add_endRequest(onEndRequest);
}

function onBeginRequest(sender, args) {
       $.blockUI();
}

function onEndRequest(sender, args) {



回答2:


you can capture these events By Sys.WebForms.PageRequestManager.getInstance() this.




回答3:


Use this code to have no problems with the update panel of your page!

        $(document).ready(function () {
            // Put your code here
        });

        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(function () {
           // Put your code here
        });

        prm.add_beginRequest(function () {
           // Put your code here
        });


来源:https://stackoverflow.com/questions/5269912/begin-and-end-request-in-updatepanel-using-jquery

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