Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a tabbed web browser its working fine , but i have a little problem and that is if i open a new tab is ok but if i go back to previous tab the urltextbox it have the url in the tab last opened tab.
so i am asking you for help if you have the solution
Posted
Comments
Sergey Alexandrovich Kryukov 13-May-15 2:34am    
It sounds extremely simple, but first, you need to tell us what do you mean by the type WebBrowser. Which one? Full type name, please.
—SA

This help you. Link[^]
 
Share this answer
 
thank you any way but i got the answer and it is



<br />
Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs)      Handles TabControl1.SelectedIndexChanged<br />
<br />
    'Grab the Web Browser control on this tab and read its URL property<br />
    'NOTE, only expect to get one browser control.<br />
<br />
    For Each wb As WebBrowser In TabControl1.SelectedTab.Controls.OfType(Of WebBrowser)(<br />
        urlTextBox.Text = wb.Url.ToString<br />
    Next<br />
End Sub<br />



The above does assume that you would only have one WebBrowser control on each TabPage. There are other ways of finding the WebBrowser control if this is not the case.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900