J
Jeff Washburn
Hi All,
I have an HttpWebRequest object that is supposed to post data to a web
page. The server is receiving the data, and I am getting an OK
response. However, the data is not ending up on the server. I put a
test on the server, and it shows that a hit is being made, but that is
all.
Here is the code I am using:
Dim content as string =
"txtName=Fred&txtNumber=123&txtData=ABC123"
Dim wr As HttpWebRequest = WebRequest.Create(url)
Dim s As Stream
wr.Method = "POST"
wr.ContentType = "application/x-www-form-urlencoded"
wr.ContentLength = content.Length
s = wr.GetRequestStream
Dim sw As New StreamWriter(s, Encoding.ASCII)
sw.Write(content)
sw.Close()
sw = Nothing
Dim wRes As HttpWebResponse = CType(wr.GetResponse,
HttpWebResponse)
wr.Abort()
wr = Nothing
s = Nothing
wRes.Close()
wRes = Nothing
Does anyone have any ideas why the data is not ending up on the
server? I have triple checked the spelling of the control names.
Thanks!!
Jeff
I have an HttpWebRequest object that is supposed to post data to a web
page. The server is receiving the data, and I am getting an OK
response. However, the data is not ending up on the server. I put a
test on the server, and it shows that a hit is being made, but that is
all.
Here is the code I am using:
Dim content as string =
"txtName=Fred&txtNumber=123&txtData=ABC123"
Dim wr As HttpWebRequest = WebRequest.Create(url)
Dim s As Stream
wr.Method = "POST"
wr.ContentType = "application/x-www-form-urlencoded"
wr.ContentLength = content.Length
s = wr.GetRequestStream
Dim sw As New StreamWriter(s, Encoding.ASCII)
sw.Write(content)
sw.Close()
sw = Nothing
Dim wRes As HttpWebResponse = CType(wr.GetResponse,
HttpWebResponse)
wr.Abort()
wr = Nothing
s = Nothing
wRes.Close()
wRes = Nothing
Does anyone have any ideas why the data is not ending up on the
server? I have triple checked the spelling of the control names.
Thanks!!
Jeff