HtmlElement.Document Property

Definition

Gets the HtmlDocument to which this element belongs.

C#
public System.Windows.Forms.HtmlDocument Document { get; }
C#
public System.Windows.Forms.HtmlDocument? Document { get; }

Property Value

The parent document of this element.

Remarks

Some HTML pages can host frames using the FRAMESET tags. In this case, each individual FRAME element will contain its own instance of HtmlDocument. This property is most useful when you have received a reference to an element in an event handler from the HtmlElementEventArgs, and need to perform some action on the document in which the element resides.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also