Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HtmlElementEventArgs Class

Note: This class is new in the .NET Framework version 2.0.

Provides data for the events defined on HtmlDocument and HtmlElement.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public sealed class HtmlElementEventArgs : EventArgs
public final class HtmlElementEventArgs extends EventArgs
public final class HtmlElementEventArgs extends EventArgs

HtmlElementEventArgs encapsulates the same information found on the window.event object when programming against the unmanaged HTML DOM or when writing Active Script for HTML pages.

In most cases, you can use ToElement to find the HTML element that is receiving the event action, and FromElement to find the HTML element that the current event is causing us to leave. However, not every event supplies a value for these properties; see the managed documentation for an event, or the corresponding documentation in the Internet Explorer SDK documentation, to discover if the event supplies it.

Many events in the HTML DOM are sent to their parent elements unless they are cancelled. This is known as event bubbling. If a SPAN inside of a DIV receives a click, then a click event is raised for the SPAN first, then for the DIV, and finally for the HTML page's BODY element. BubbleEvent controls whether an event will behave in this manner or not.

System.Object
   System.EventArgs
    System.Windows.Forms.HtmlElementEventArgs

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft