Tim Stoner

Tim Stoner

  • NA
  • 1
  • 0

How to implement SERVER SIDE AJAX in C#

Jun 9 2008 8:35 PM

Hello Forum,

I am NOT trying to implement AJAX via the browser and the server. RATHER, I want the server-side code to request a response from another website as part of the server side code.  You can do this in Classic ASP with the following code:

TheURL = "http://www.some-page-that-returns-xml-or-whatever.com
Set MyConnection = CreateObject("Microsoft.XMLHTTP")
MyConnection.Open "GET", TheURL, False
MyConnection.Send
TheData = MyConnection.responseText
Set MyConnection = Nothing

NOTE, this is all server side ASP code, not javascript.  How can I do this, nice and simple like this, in C# associated with an ASPX web page?  Can someone please take pity on my and post me a piece of code that would work?  Thanks!!!!

Tim