C # WebBrowser - how to get rid of JavaScript error hint?

I work with C # WebBrowser, and sometimes when a page loads (not always), I get the following hint:

An error has occured in the script on this page. Line 1 Char 45774 Error Object required Code 0 URL http://xxx.i_replaced_the_link_here.com/blah_BLAH_blah123 Do you want to continue running scripts on this page? Yes / No 

I want to continue, but I canโ€™t keep clicking the โ€œYesโ€ button.

Do you think I can fix this?

+8
javascript html c # browser
source share
1 answer

You can set the WebBrowser.ScriptErrorsSuppressed control property to true . You will not receive any errors in this way.

+12
source share

All Articles