HtmlDocument.CreateElement Method

Silverlight

Creates a browser element.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)

[SecuritySafeCriticalAttribute]
public HtmlElement CreateElement(
	string tagName
)

Parameters

tagName
Type: System.String
The tag name of the browser element to create.

Return Value

Type: System.Windows.Browser.HtmlElement
A reference to a browser element.

ExceptionCondition
ArgumentException

tagName is an empty string.

ArgumentNullException

tagName is null.

InvalidOperationException

An unexpected error occurred.

This method creates a standalone (unparented) instance of a browser element.

Some browsers let you include additional information in the tagName parameter. For example, Internet Explorer lets you include an HTML element definition and attribute values.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: