Friday, 22 June 2012

UpdatePanel initializeRequest and endRequest

$(document).ready(function() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandle);
            Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initializeRequest);
            var postBackElement = "";
            function initializeRequest(sender, eventArgs) {
                postBackElement = eventArgs.get_postBackElement().id;
            }
           
            function endRequestHandle(sender, args) {
                if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())
                    // Do something…                   
            }
        });

No comments:

Post a Comment