Web Browser Question

  • Thread starter Thread starter kronecker
  • Start date Start date
K

kronecker

I have a very simple web browser which connects to a web site (lets
say Google for example). How can I get
my program to enter data that I type into the Google page and press
the submit button? By this I mean that I have a text box in my program
that I want to transfer data to the web page?

Thanks

K.
 
I have a very simple web browser which connects to a web site (lets
say Google for example). How can I get
my program to enter data that I type into the Google page and press
the submit button? By this I mean that I have a text box in my program
that I want to transfer data to the web page?

Thanks

K.

There is two ways of sending data in a request to the server. You can
either make a POST or a GET.

In a GET request you send the data by adding it to the URL.

In a POST request you can also send form data.

The form in the web page has a method property that determines how the
browser sends the data. If it's not present, GET is the default.
 
I have a very simple web browser which connects to a web site (lets
say Google for example). How can I get
my program to enter data that I type into the Google page and press
the submit button? By this I mean that I have a text box in my program
that I want to transfer data to the web page?

Thanks

K.

If understood correctly, place a textbox, a button and a webbrowser on
your form, the textbox is for that you'll use to input words to search
in Google. So, after pressing button the search will be performed and
your webbrowser will be navigated to search result directy using:


' Here is your button's click event
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' Webbrowser control to display result with combining input in
TextBox1 control
WebBrowser1.Navigate("http://www.google.com/search?hl=en&q=" &
TextBox1.Text)
End Sub


Hope this helps,

Onur Güzel
 
Kronecker,

A so called webbrowser is nothing more then the reusing in IE, so find out
how to do it in IE then you know it in the WebBrowser.

Cor
 
Back
Top