Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Converting ASP code to ASP.NET code


Message #1 by "Royce Fickling" <rfickling@d...> on Mon, 5 Aug 2002 18:52:19
The following is the old way of sending a request to a private web service 
which I have used:

   var strDataToSend = "<YearListRequest></YearListRequest>";
   var serverxmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP");
   serverxmlhttp.open("POST", "http://www.xxxxxxxx.com/cgi-
bin/xxxxxxxx.exe", false);
   serverxmlhttp.setRequestHeader("Content-Type", "application/x-www-form-
urlencoded");
   serverxmlhttp.send(strDataToSend);
   var strResponse = serverxmlhttp.responseText;
   if (strResponse == "")
   {
      Response.Write("Error getting vehicle year list");
      returnError();
   }

I am trying to convert this to ASP.NET/C#.  How do I do the same thing 
using ASP.NET with C#?  (I have removed the actual url from the open 
command as this is a private web service.)  This web service does not 
publish a WSDL document, so I can't build a proxy as described by the 
books and MSDN.  I have Wrox books 'Beginning ASP.NET Using C#' 
and 'Professional ASP.NET Web Services', but they have been no help.  Any 
help would be greatly appreciated.

Thanks,
Royce Fickling

  Return to Index