You can do a post using the WebClient class. Here's some sample code. The
values to post go in the NameValueCollection
Sub DoPost()
Dim uriString As String = _
"
http://localhost/p4320work/mySpecialPage.aspx"
Dim strGoName As String
strGoName = TextBox1.Text
' Create a new WebClient instance.
Dim myWebClient As New System.Net.WebClient
Dim myNameValueCollection As New _
System.Collections.Specialized.NameValueCollection
myNameValueCollection.Add("go1", strGoName)
myNameValueCollection.Add("Button1", "")
Dim responseArray As Byte() = myWebClient.UploadValues _
(uriString, "POST", myNameValueCollection)
Label1.Text = "Response received was :" & _
System.Text.Encoding.ASCII.GetString(responseArray)
End Sub
Ken
Microsoft MVP [ASP.NET]
Toronto
mortb said:
Sometimes you want to transfer to another page and pass some values along
not using the query string nor the session.
Is there some way to do this?
cheers,
mortb