How can i navigate the HTML pages that i have called into my vb.net application?
Hi,
I got the HTML pages to my project but now I have another question!
How can I navigate the HTML pages that i have called into my vb.net application?
Re: How can i navigate the HTML pages that i have called into my vb.net application?
There is a WebBrowser control in .NET that you can use to interact with HTML page.
Just tell the control to navigate to a web page (or url). The control have properties and method that allow you to interact with the HTML Document Object Model (DOM)
Re: How can i navigate the HTML pages that i have called into my vb.net application?
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)
Re: How can i navigate the HTML pages that i have called into my vb.net application?
I think you need to go through this tutorial to understand the concept of
http://msdn.microsoft.com/en-us/library/2te2y1x6.aspx
Hope this helps you!