how to call ASHX handler and getting the result back

BikiDas

New Member
I have created a Handler which return integer value after doing some database work. i would like to know how can i get that value and assign that value to Label by calling that handler.I have googled it and most of the example uses Jquery.AJAX calls to retrieve the value. I am sure i can also get the value by using that. BUT for some limitation in my company i am restricted to use code behind. Any example will help.\[code\]Handler: http://somesite.com/Stores/GetOrderCount.ashx?sCode=VICwhich returns: 3\[/code\]need to assign this to a label controli have tried this much so far.\[code\]HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://somesite.com/Stores/GetOrderCount.ashx?sCode=VIC");HttpWebResponse response = (HttpWebResponse)request.GetResponse();Label1.Text = response.ToString() // this does not work\[/code\]
 
Back
Top