Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting a serverxmlhttp jscript into c# desktop app

Status
Not open for further replies.

yahoo182

Programmer
Jul 5, 2005
70
CA
Hi there,
I need to convert the fllowing Jscript asp snipplet into a C# function, but I can't seem to find how I can create this serverxmlhttp object in my C# desktop app function.

Any hlep is much appriciated
Code:
    var xmlhttp = Server.CreateObject("Msxml2.SERVERXMLHTTP.4.0");             \

    var xmldoc  = Server.CreateObject("Msxml2.FreeThreadedDomDocument.4.0");   \

    try{
      if(debugging){
        xmlhttp.setOption(2, 13056);
      }
      xmlhttp.open("GET", url, false, "", "");
      xmlhttp.send("");
      xmldoc.validateOnParse = false;
      xmldoc.loadXML(xmlhttp.responseText);
      xmlhttp = null;
      return xmldoc;
    }
    catch(e) {
      Response.Write(e + " " + e.description + " " + e.message);
      xmlhttp = res = null;
      return null;
    }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top