1
Answer

Suppressing IE script errors in C# .NET

sds

sds

18y
3.7k
1
Hi, I’m trying to creating a HTML document object from a string containing the HTML text. The page contains some script errors and when the trying to load the HTML document the IE script errors are being displayed in the dialog box. This happens when the “Disable Script Debugging” option is not checked in the IE. But when I check the option, the errors are automatically suppressed by the browser itself. Is there any way to suppress these script errors from the .Net code. Following is the code snippet which I have used, private void createDocument(string htmlString) { object[] objArray = { htmlString }; HTMLDocument htmlDocument = new HTMLDocumentClass(); IHTMLDocument2 iHtmlDocument2 = (IHTMLDocument2)htmlDocument; iHtmlDocument2.write(objArray); } Awaiting ur earliest replies !! Thanks in advance, Anand.
Answers (1)