I need to get notified about asynchronous requests in ASP.NET. I used the jQuery .ajaxSend global event but it does not trigger when using UpdatePanels.
Is there a multi-browser way to detect when a request is being made on a page?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Jquery and the ASP.Net Ajax are two different javascript frameworks and they each handle the Ajax requests differently. As a result code in used in Jquery will not be hooked up in the ASP Ajax.
The one way I have handled this type of thing is hook into the page request manager (ScriptManager) and add methods to the InitializeRequest and EndRequest events.
Some javascript along these lines should sort out your problem.
EDIT:
Looking at the life cycle of the Asp.Net Ajax you could also use the beginRequest event if initializeRequest is too early.