How to Block UI when update using jquery .
How to Block UI when update using jquery .
Simple two step to block UI on page when the updation is working .
1- Use this jquery.blockUI.js , you have to download and use this .
2-Use this jquery function on the master page or page .
<script type="text/javascript">
$(document).ready(function() {
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(onRequestStart)
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onRequestEnd)
});
function onRequestStart() {
$.blockUI();
}
function onRequestEnd() {
$.unblockUI();
}
function EndRequestHandlerForUpdatePanel(sender, args) {
if (args.get_error() != undefined) {
var msg = args.get_error().message.replace("Sys.WebForms.PageRequestManagerServerErrorException: ", "");
alert(msg);
args.set_errorHandled(true);
}
}
</script>
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home