Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Is there a client-side event fired when PageMethod or ajax-enabled web service call is made

$
0
0

I am calling either ajax-enabled web service or PageMethod in multiple places in my ASP.Net app. I would like to track every such call i.e. log that such a call was made, and was looking for a client-side event in ASP.Net AJAX framework for this.

Question: Is there a client-side event to capture a call to PageMethod or ajax-enabled web service in ASP.Net AJAX framework? I would like to capture this in a single place. I can do this by writing the capture code for every such call, but I was hoping to do this globally. May be this is not possible.

Ajax Enabled Web Service call from one of the asp.net pages

ABC.WebServices.Utils.RefreshCustomer(custId);

Events that I tried which did not work

var prm =Sys.WebForms.PageRequestManager.getInstance();
    prm.add_beginRequest(BeginRequestHandler);functionBeginRequestHandler(sender, args){
        startTime =newDate();}
    prm.add_endRequest(function(sender, e){
        console.log('a PageMethod or ajax-enabled service request was made');});

Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>