HtmlNodeItemGetId Method

Safely return the ID attribute of the provided node, if it exists.

Definition

Namespace: Html
Assembly: Html (in Html.dll) Version: 25.2822.3845
C#
public static string GetId(
	HtmlNodeItem node
)

Parameters

node  HtmlNodeItem
Reference to the HTML node to inspect.

Return Value

String
The ID attribute if the node, if found. Otherwise, an empty string.

See Also