Assembly: System.Windows.Forms (in system.windows.forms.dll)
The name of the attribute. This argument is case-insensitive.
Return ValueThe value of this attribute on the element, as a String value. If the specified attribute does not exist on this element, returns an empty string.
An attribute in HTML is any valid name/value pair for that element. HtmlElement exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; SRC is a predefined attribute for the IMG tag, for example, but not for the DIV tag. Use GetAttribute and SetAttribute to manipulate attributes not exposed on the managed Document Object Model (DOM).
GetAttribute and SetAttribute are case-insensitive.
The following code example retrieves all of the META tags within an HTML document, using GetAttribute to find the META tag with the name Description. The example requires that your application has a WebBrowser control named WebBrowser1.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.