Gets the value of the named attribute on the System.Web.UI.HtmlControls.HtmlControl control.
![]()
The 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 ("").
Use the HtmlControl.GetAttribute(string) method to access an attribute on the System.Web.UI.HtmlControls.HtmlControl server control. All HTML server controls store their attributes in the System.Web.UI.Control.ViewState property. HTML attributes are treated by the ASP.NET page framework as properties on the HTML server control to which they belong. The HtmlControl.GetAttribute(string) method's name parameter is case-insensitive.