0

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

using the normal "get control" script I have mine like:

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 sender and args?

I went through the MSDN and they talk nothing about the methods we can use, and there is no intellisence in VS2008 for this part...

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

3 Answers 3

1

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

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

Sign up to request clarification or add additional context in comments.

Comments

0

Debug in ScriptDebugger and find out the contents of sender and args you can identify that which control has caused the postback

Comments

0

To know which element caused postback, you can use args.get_postBackElement().id.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.