This documentation is archived and is not being maintained.

AttributeCollection::Keys Property

Gets a collection of keys to all attributes in the server control's AttributeCollection object.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public:
property ICollection^ Keys {
	ICollection^ get ();
}

Property Value

Type: System.Collections::ICollection
The collection of keys.

This property contains all the keys that are in the AttributeCollection of an ASP.NET server control, whether you have added them programmatically with the Add method, or declaratively.

TopicLocation
How to: Read HTML Attributes for Controls in Web Forms PagesBuilding ASP .NET Web Applications
How to: Read HTML Attributes for Controls in Web Forms PagesBuilding ASP .NET Web Applications

The following example shows how to iterate through the Keys property of the AttributeCollection object for an HtmlSelect server control.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: