
Originally Posted by
Angel@dot-q
Hi,
I've to control the user input to a html form in one webbroser inside my VB.NET code, is there a way of do this? I need to retrieve the data when it's submited if posible.
Thanks.
I dont think you can do it with that control, however you can do it with the netclient control
You need to create the array of fields (the form)
upload it and retrieve the bytes returned.
Then convert those bytes into text to view the html page returned.
VB Code:
Dim netc As New Net.WebClient
Dim vals As New Specialized.NameValueCollection
vals.Add("name", "phill") 'add a field to be uploaded
Dim rdata() As Byte = netc.UploadValues("http://here.com/there.asp",vals) 'upload form and retrieve bytes back
Dim sdata As String = System.Text.Encoding.ASCII.GetString(rdata).ToString 'convert bytes into text