Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm working with C# WebBrowser, and sometimes when the page is loaded (not always) I get following prompt:

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 cannot be constantly clicking the Yes button.

How do you think I can fix it?

like image 757
Serge Vinogradov Avatar asked Nov 04 '11 13:11

Serge Vinogradov


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.

What is C language?

C is a high-level and general-purpose programming language that is ideal for developing firmware or portable applications. Originally intended for writing system software, C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System in the early 1970s.

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.


1 Answers

You can set the WebBrowser.ScriptErrorsSuppressed control property to true. You wont be getting any errors that way.

like image 68
Ioannis Karadimas Avatar answered Sep 30 '22 00:09

Ioannis Karadimas