nondos wrote:
i have this html code that do search everytime i click on the button
<FORM action=http://www.url.com/?s=somthing method=post><INPUT
type=submit value="search" name=src>
now i want to do the same thing but in vb.net
any idea how to do it?
notice to the way the data send to the server in the html code
(method=post)
It might be different in the .NET 2.0 framework, but in the 1.1 framework
you'd be wanting to look at System.Net.HttpWebRequest and set
..Method = "POST"
..ContentType = "application/x-www-form-urlencoded"
Don't forget to set the .ContentLength. To send the data, you use a
StreamWriter (Dim myWriter As New StreamWriter(webReq.GetRequestStream())),
and to get a handle to the response you need a WebResponse.
Using that handle, you use a StreamReader to actually read the data.
Don't forget to use try..catch liberally as Internet communication is not
fault-free.
HTH
Andrew