Assyncronous interaction using Sys WebForms PageRequestManager

I'm trying to display a panel to the user when an asynchronous call is made, but only if it comes from a specific call.

using a normal "get control" script I have mine:

function pageLoad() {

    try {
        var manager = Sys.WebForms.PageRequestManager.getInstance();
        manager.add_endRequest(OnEndRequest);
        manager.add_beginRequest(OnBeginRequest);
    }
    catch (err) { }
}

function OnBeginRequest(sender, args) {
    //alert('Start\n\n' + sender + '\n\n' + args);
    var p = document.getElementById('ajaxLoadingPanel');
    p.style.visibility = 'visible';
    p.style.display = 'inline';
}

function OnEndRequest(sender, args) {
    //alert('End\n\n' + sender + '\n\n' + args); 
    var p = document.getElementById('ajaxLoadingPanel');
    p.style.visibility = 'hidden';
    p.style.display = 'none';
}  

      

but my question is How do I know the methods of the sender and the arguments?

I went through MSDN and they don't say anything about the methods we can use and there is no bloat in VS2008 for this part ...

any ideas? I want to get a list of methods and properties for both senders and arguments that I can use in this javascript API.

0


a source to share


3 answers


This documentation is helpful: http://msdn.microsoft.com/en-us/library/bb398976.aspx



It has a table of all the events on the PageRequestManager and their event arguments. The args event then documents their properties, etc. The sender is always PageRequestManager.

+1


a source


Debugging in ScriptDebugger and figuring out the content of the sender and arguments you can determine which control caused the postback



0


a source


To find out which element caused the postback you can use args.get_postBackElement().id

.

0


a source







All Articles