System.Windows.Forms.HtmlElement.Parent Property

Gets the current element's parent element.

Syntax

public HtmlElement Parent { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The HtmlElement.Parent property enables discovery of an element's context. It is most useful inside of event handlers such as HtmlElement.Click, which can fire for any element anywhere in the document's object hierarchy.

The HtmlElement.Parent property of the HTML element (the top of an HTML document) points back to itself. If you call HtmlElement.Parent inside a loop, verify that the loop's break condition compares the type of the current element and the type of the Parent property, or else your code may execute an infinite loop.

Requirements

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