Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetAttribute Method

HtmlElement.GetAttribute Method

Silverlight

Gets the value of the specified attribute on the current HTML element.

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

public string GetAttribute(
	string name
)

Parameters

name
Type: System.String
The name of an attribute.

Return Value

Type: System.String
An attribute on the current HTML element.

ExceptionCondition
ArgumentException

name is an empty string.

ArgumentNullException

name is null.

If the specified attribute does not exist on the current HTML element, this method returns null.

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:
© 2015 Microsoft