Skip to content

Instantly share code, notes, and snippets.

@EdPitt
Created June 28, 2012 11:03
Show Gist options
  • Save EdPitt/3010693 to your computer and use it in GitHub Desktop.
Save EdPitt/3010693 to your computer and use it in GitHub Desktop.
Blocking UI while loading Ajax UpdatePanel in ASP.NET
//include the jquery.blockui.js plugin on your page first
<script type="text/javascript">
Page = Sys.WebForms.PageRequestManager.getInstance();
Page.add_beginRequest(OnBeginRequest);
Page.add_endRequest(endRequest);
function OnBeginRequest(sender, args) {
$.blockUI();
}
function endRequest(sender, args) {
$.unblockUI();
}
</script>
@karlitros
Copy link

Fantastically handy bit of code, that! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment