DataKeyArray Class
Assembly: System.Web (in system.web.dll)
The DataKeyArray class is used to store and manage a collection of DataKey objects. A DataKey object represents the primary key of a record in a data-bound control. In general, data-bound controls that display multiple records (such as the GridView control) use a DataKeyArray object to store the DataKey objects for the records displayed in the control.
The DataKeyArray class supports several ways to access the items in the collection:
-
Use the Item indexer to directly retrieve a DataKey object from the collection at a specific zero-based index.
-
Use the GetEnumerator method to retrieve an enumerator that can be used to iterate through the collection.
-
Use the CopyTo method to copy the items in the collection into an array, which can then be used to access the items in the collection.
To determine the total number of items in the collection, use the Count property.
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
Windows 98, Windows 2000 SP4, 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.