If you have a form with a WebBrowser and a textbox as your address bar, the following would take you to DIC
Code:
Me.WebBrowser1.Navigate("http://www.techarena.com")
If it was placed in a buttons click event
Suppose you had a form with three controls: a button (Button1), a textbox (TextBox1), and a web browser control (WebBrowser1).
If you want to browse your own URLs in the browser at run-time you could make the button, textbox and web control. The user enters the URL into the textbox and clicks the button to "go" (navigate) to that webpage.
The code for the entire program would look like this:
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
End Class
No code would really go into the textbox or the web control... simply in the button.
Under the button click action i have placed the code:
Code:
WebBrowser1.Navigate(TextBox1.Text)
Bookmarks