sds

sds

  • NA
  • 3
  • 0

Suppressing IE script errors in C# .NET

Oct 9 2006 4:13 AM
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)