System.Windows.Forms.HtmlElement.AppendChild Method

Adds an element to another element's subtree.

Syntax

public HtmlElement AppendChild (HtmlElement newElement)

Parameters

newElement
The System.Windows.Forms.HtmlElement to append to this location in the tree.

Returns

The element after it has been added to the tree.

Remarks

The HTML Document Object Model (DOM) enables you to alter the run-time contents of an HTML file in a number of ways. Use HtmlElement.AppendChild(HtmlElement) to add new elements to an existing document, or to move an element on the page.

If an element has already been parented, appending an element to another element will automatically remove that element from its previous parent.

Any additions made to a document at run-time using HtmlElement.AppendChild(HtmlElement) will not be persisted when you call the WebBrowser.ShowSaveAsDialog method on the System.Windows.Forms.WebBrowser control.

Requirements

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