webbrowser home page

ethicalhacker

Well-known member
Joined
Apr 22, 2007
Messages
142
Location
Delhi,India
Programming Experience
5-10
Ive figured that the webbrowser.url property can be used to open a website when the webbrowser loads
So how do I set webrowser url from textbox textso I can take input from the user for the site that he wants to set as the homepage
I tried webbrowser1.url(textbox.text) but I get all sorts of errors.
Please help
 
Navigate method is easier if you have a string url. If you want to use a local homepage for your application only you can store it in user settings. For Internet Explorer it is stored in registry key Software\Microsoft\Internet Explorer\Main of CurrentUser hive, in string key "Start Page".
 
changing url property of webbrowser with textbox text

I want the user to enter a site in the textbox and the site should be set as the homepage as the webbrowser control is loaded ,i need to do this so i can change the homepage of the webbrowser control only for my browser
 
Go to projects properties and create a user setting for it. See link in previous post for more info.
 
i tried
VB.NET:
Sub ChangeHomepage(ByVal newHomepage As String)
    My.Settings.Homepage = newHomepage
End Sub
on button click i called the ChangeHomepage function
ChangeHomepage(textbox1.text)
but the user setting remained same
are these changes viewable at design time. How do I make the webbrowser load this site on loadtime without using the url property (do I use the navigate method in the form's load event) and how will i navigate the string that has been set.DO i use webbrowser1.navigate(My.Settings.Homepage) ?Will these changes be permanenant so that when the user closes the application and runs it again the settings he has set like the homepage he has set remains?
 
this code isnt working anymore for me I had made this work before but i lost the code and now when i tried it again it still dint work. Iused the same code
Sub ChangeHomepage(ByVal newHomepage As String)
My.Settings.Homepage = newHomepage
End Sub
on button click i called the ChangeHomepage function
ChangeHomepage(textbox1.text)
but its just not working, the value remains same!
 
Back
Top