Tuesday December 1st

Monday November 30th

How to Suppress / Disable Script Errors in WebBrowser Control

I am currently writing an application that uses the WebBrowser control to perform operations on web pages. Unfortunately I stumbled upon a very annoying problem, sometimes an Internet explorer script error window pops up and stops all execution until you click the OK button. I've searched the web for hours and the same answer came up:


This is hilarious. The author readily admits that instead of glancing at the UI of his IDE or pressing the F1 key to see the members of the control, he instead "searched the web for hours". I've used this control in multiple applications and ScriptErrorsSuppressed is one of a small number of properties prominently displayed in the designer UI. Clicking it shows "Specifies whether the WebBrowser control shows script errors in dialog boxes" in the detail area. There aren't even that many members on this control, so hitting F1 should have ended Amit's "hours long" search in 1 minute. If I blog about how hard it is to see the "ScrollBarsEnabled" property can we kick that too?

-> jesse - it's not as simple as You think, the problem is when I change this property to true - IE script error window gets disabled but instead You get other window - something like this
in my case any workaround is good (except SendKeys.Send("%n") <- alt + n - works in 50%, need 100% ) so if You can help us do so and maybe someone help You when You will be in need. Regards.

ok, I found it ;)
in Internet Explorer menu Tools -> Internet Options ->Advanced ->check Disable Script Debugging (Others), and when You have ScriptErrorsSuppressed set to true it works fine (i made just a few tests)

i know you can find it in the Help, but you know, sometimes you overlook things... :)
as for you DaveMasters i am not getting this window when i disable this, i will try to check it out, thanks for the feed back happy holidays.

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network