System.Windows.Forms.HtmlDocument.GetElementById Method

Retrieves a single System.Windows.Forms.HtmlElement using the element's ID attribute as a search key.

Syntax

public HtmlElement GetElementById (string id)

Parameters

id
The ID attribute of the element to retrieve.

Returns

Returns the first object with the same ID attribute as the specified value, or null if the id cannot be found.

Remarks

If there are multiple elements in the document with the same ID value, HtmlDocument.GetElementById(string) will return the first one it finds.

Requirements

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