This documentation is archived and is not being maintained.

ListItem.Attributes Property

Gets a collection of attribute name and value pairs for the ListItem that are not directly supported by the class.

[Visual Basic]
Public ReadOnly Property Attributes As AttributeCollection
[C#]
public AttributeCollection Attributes {get;}
[C++]
public: __property AttributeCollection* get_Attributes();
[JScript]
public function get Attributes() : AttributeCollection;

Property Value

A System.Web.UI.AttributeCollection that contains a collection of name and value pairs.

Remarks

Use the Attributes collection to manage the attribute name and value pairs declared in the opening and closing tags of the ListItem, but not directly supported by the class. You can programmatically add or remove attributes to the collection.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

ListItem Class | ListItem Members | System.Web.UI.WebControls Namespace | System.Web.UI.AttributeCollection

Show: