0

Ok so I have a WebBrowser called wb. And I load a page into wb using wb.Navigate("url"); When the page loads I get a box saying "Script Error".

Here is the one I get
The Error I get

How can I keep this from popping up in my program?

ThatBenderGuy
  • 307
  • 1
  • 6
  • 15
  • possible duplicate of [Disable JavaScript error in WebBrowser control](http://stackoverflow.com/questions/2476360/disable-javascript-error-in-webbrowser-control) – Gabe Apr 25 '12 at 13:05
  • 1
    Search for your solution instead of asking new questions... http://stackoverflow.com/questions/2476360/disable-javascript-error-in-webbrowser-control – Jonathan Apr 25 '12 at 12:55

1 Answers1

11

Not sure on newer browser control, but off the top of my head, there is an option called SuppressScriptErrors or something like that. Set that to true in your code before performing work. You'll also have to make sure that under Internet Options that debugging web pages is off (if you're getting the dialog above, it is off).

http://www.dev102.blogspot.com/2007/12/how-to-suppress-disable-script-errors.html

wb.ScriptErrorsSuppressed = true;
Derreck Dean
  • 3,598
  • 1
  • 25
  • 44