Well, in vb.net 2005, how can i make is so that after the webbrowser has navigated to site, the site address is displayed in a textbox?
Cheers!
Printable View
Well, in vb.net 2005, how can i make is so that after the webbrowser has navigated to site, the site address is displayed in a textbox?
Cheers!
Well you pass the string that you want to go to into the .Navigate method of the Webbrowser, correct? Before that line of code just update the text of a textbox with that same string...
yeh, ive got that part figured out. (if I understood your reply), but lets say i go to google.com... if i write google.com in the textbox, it wont update to http://www.google.com which is the real address. Also, if i click a link, lets say http://www.google.com/somecrazylink , the textbox wont update to show that address..
This is what im trying to accomplish :)
Cheers!
Well there is a Navigating event of the Webbrowser control, you can update the text in that event (or the Navigated event, but the former allows them to see the site before it actually finishes loading). Just display the URL of the passed in argument object of the event..
VB Code:
Private Sub WebBrowser1_Navigating(.....) Handles WebBrowser1.Navigating TextBox1.Text = e.Url.ToString End Sub
VB Code:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted WebBrowser1.Document.Url.AbsoluteUri End sub
There you go :cool:
blast! Too late then :cry:
thanks for the help! :) Now its just a matter of that damned tabcontrol problem (see other post)
Cheers!