System.Windows.Forms.HtmlWindow.Error Event

Occurs when script running inside of the window encounters a run-time error.

Syntax

public event HtmlElementErrorEventHandler Error

Remarks

HTML pages can contain script code, usually written in JScript or VBScript, that executes when a page is loaded. HtmlWindow.Error occurs whenever a script encounters a run-time error. Because script code is late-bound, which means that calls against the object are not resolved until run-time, errors can include everything from referencing a null object to calling an undefined property or method.

You can set the HtmlElementErrorEventArgs.Handled property of System.Windows.Forms.HtmlElementErrorEventArgs to true in order to prevent the native error dialog box in Internet Explorer from displaying.

For more information about the difference between canceling event bubbling and canceling the default action on an event, see tp://msdn.microsoft.com/en-us/library/ms533022.aspx.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0