ashkufaraz
ashkufaraz

Reputation: 117

Begin and end request in UpdatePanel using jQuery

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

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

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

Upvotes: 4

Views: 4893

Answers (3)

Thwyster
Thwyster

Reputation: 111

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
        });

Upvotes: 0

sm.abdullah
sm.abdullah

Reputation: 1812

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

Upvotes: 0

ashkufaraz
ashkufaraz

Reputation: 117

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

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

function onEndRequest(sender, args) {

Upvotes: 5

Related Questions