I created a handler that returns an integer value after doing some database work. I would like to know how I can get this value and assign this Label value by calling this handler.
I have googled, and most examples use Jquery.AJAX calls to retrieve the value. I am sure that I can also get the value using this. BUT for some restrictions in my company I am limited to use the code behind.
Any example will help.
Handler: http://somesite.com/Stores/GetOrderCount.ashx?sCode=VIC which returns: 3
you must assign this to the label control
I've tried a lot already.
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
patel.milanb
source share