Sending data to webserver

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi,

In an old eVB program, it sends data to a ASP program with this:

dim xmlHTTP as XMLHTTPRequest
set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
xmlHTTP.Open "POST", url-string, False
xmlHTTP.Send

result = xmlHTTP.ResponseText

Now I am trying to rewrite the program to vb.NET 2005, but XMLHTTPRequest is
unknown.

I assumed I needed:

dim xmlHTTP as Net.HttpWebRequest
dim Result as Net.HttpWebResponse

urlstring = "...."

xmlHTTP = Net.HttpWebRequest.Create(urlstring)
xmlHTTP.TimeOut = 20000
result = xmlHttp.GetResponse
resulttext = result.StatusDescription

The ASP page on the server responds with either "ACK" or "NACK" and for the
eVB program is works, but my result is "OK"

Where am I going wrong here?

rg,
Eric
 
Back
Top