System.Web.UI.HtmlControls.HtmlControl.Attributes Property

Gets a collection of all attribute name and value pairs expressed on a server control tag within the ASP.NET page.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public System.Web.UI.AttributeCollection Attributes { get; }

Value

a System.Web.UI.AttributeCollection

Remarks

Use this property to programmatically access the attributes of the HTML server control. All HTML server controls store their attributes in the System.Web.UI.Control.ViewState property.

HTML attributes are treated by the .NET Framework as properties on the HTML server control to which they belong.

For additional information on the attributes collection, see the System.Web.UI.AttributeCollection class.

Requirements

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0