.NET Framework Class Library for Silverlight
HtmlDocument..::.GetElementsByTagName Method

Gets a collection of browser elements.

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

Visual Basic (Declaration)
Public Function GetElementsByTagName ( _
    tagName As String _
) As ScriptObjectCollection
Visual Basic (Usage)
Dim instance As HtmlDocument
Dim tagName As String
Dim returnValue As ScriptObjectCollection

returnValue = instance.GetElementsByTagName(tagName)
C#
public ScriptObjectCollection GetElementsByTagName(
    string tagName
)

Parameters

tagName
Type: System..::.String
A browser element's tag name.

Return Value

Type: System.Windows.Browser..::.ScriptObjectCollection
A collection of references to HTML elements that correspond to the requested tag name.
Exceptions

ExceptionCondition
ArgumentException

tagName is an empty string.

ArgumentNullException

tagName is nullNothingnullptra null reference (Nothing in Visual Basic).

InvalidOperationException

An unexpected error occurred.

Remarks

If no elements that correspond to the requested tag name are found, an empty collection is returned.

Platforms

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

See Also

Reference

Tags :


Page view tracker