4

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

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

function onEndRequest()
{ 
     //$.unblockui;
}
demo
  • 6,038
  • 19
  • 75
  • 149
ashkufaraz
  • 117
  • 2
  • 9
  • related article i think : http://encosia.com/using-jquery-to-enhance-aspnet-ajax-progress-indication/ – demo Apr 17 '15 at 13:06

3 Answers3

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

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

function onEndRequest(sender, args) {
Amar Palsapure
  • 9,590
  • 1
  • 27
  • 46
ashkufaraz
  • 117
  • 2
  • 9
0

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

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
sm.abdullah
  • 1,777
  • 1
  • 17
  • 34
  • That answer was already given almost two years ago, except with example code.. and without an external link. Do not include these links in the future. – Andrew Barber Jan 19 '13 at 03:49
0

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
        });
Thwyster
  • 71
  • 7