Results 1 to 3 of 3

Thread: WebBrowser Being navigated by a string setting

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    19

    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:
    1. WebBrowser1.Navigate(My.settings.homepage)

    I tried the same thing except using

    c#.net Code:
    1. 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?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2009
    Posts
    19

    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width