WebBrowser Being navigated by a string setting
I have recently just started c#.net after doing Vb.net for about a year or so. I understand most of c# its just one thing that i cant seem to find on google to help me or anything. In vb.net, when i made a webbrowser, i sometimes used a setting or so for a homepage. So you could have a different homepage in this program. I used code like:
vb.net Code:
WebBrowser1.Navigate(My.settings.homepage)
I tried the same thing except using
c#.net Code:
WebBrowser1.Navigate(Properties.Settings.Default.Homepage)
And it would not work, any chance somone knows how to fix this and use a stringed setting to navigate a webbrowser?
Re: WebBrowser Being navigated by a string setting
Looks fine to me. What actually happens? Is there an error message? What does Properties.Settings.Default.Homepage return? Do you actually have a WebBrowser control named 'WebBrowser1' on your form, keeping in mind that C# is case sensitive?
Re: WebBrowser Being navigated by a string setting
Okay, this is actualy weird, It would not work at all last night, but now it does. I think it was just capitalisation, like you said ;) Thanks anyway!