0

I am trying to launch a webpage in my WebBrowser component in a winform application using Visual studio.

    public Form1()
    {
        InitializeComponent();
    }

    private void btnLoadNS3420_Click(object sender, EventArgs e)
    {
        Console.WriteLine(webBrowser.Version);
        webBrowser.Navigate(new Uri("https://login.focus.no/?redirect=http://mywebpage.com"));
    }

The code is just click a button, go to URL for now.

When the page is loaded I get errors for every javascript file on the given page. jquery.min gives error line 0, bootstrap.min gives "Script Error" line 0. Redirect gives error etc.

My page that is written in Angular, with tons of java script files, gives 20+ error popups...

Is there a way to fix this? Not just by disabling error popups. I need the javascript files to actually run.

The webBrowser.Version = 11.0.10586.212 btw.

ganjan
  • 7,356
  • 24
  • 82
  • 133
  • might be this link is helpful http://www.devhut.net/2013/10/18/webbrowser-activex-control-google-maps-invalid-character-scripting-error/ – rashfmnb Apr 29 '16 at 13:52
  • The `WebBrowser.Version` property is just which Internet Explorer version is installed, _not_ what your web browser uses. See: http://stackoverflow.com/a/17922508/3740093 – Visual Vincent Apr 29 '16 at 13:54
  • Possible duplicate of [use latest version of ie in webbrowser control](http://stackoverflow.com/questions/17922308/use-latest-version-of-ie-in-webbrowser-control) – Visual Vincent Apr 29 '16 at 13:55

0 Answers0