Export (0) Print
Expand All

IDataKeysControl Interface

Defines properties that specify how ASP.NET creates client IDs for a data-bound control.

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

public interface IDataKeysControl

The IDataKeysControl type exposes the following members.

  NameDescription
Public propertyClientIDRowSuffixGets the names of the data fields whose values are used to uniquely identify each instance of a data-bound control when ASP.NET generates the Control.ClientID value by using the ClientIDMode.Predictable algorithm.
Public propertyClientIDRowSuffixDataKeysInfrastructure. Gets a collection of the data values that are used to uniquely identify each instance of a data-bound control when ASP.NET generates the ClientID value.
Top

The IDataKeysControl interface defines two properties that data-bound controls implement to let you specify how a client ID is created. A data-bound control that displays multiple instances of a control must create an ID for each instance of the control. That ID must be unique in order to enable access to the control from client script.

The ClientIDRowSuffix property lets you specify the name or names of data fields whose values are included in the generated value for the ClientID property. These values are used to uniquely identify each instance of the control in a way that corresponds to a meaningful data value, instead of to an arbitrary value such as the order in which the controls are rendered on the page. For example, when you display records from a products data table, you can assign ProductID to the ClientIDRowSuffix property. In that case, each instance of the data-bound control can be identified by the value from the ProductID field.

.NET Framework

Supported in: 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft