Redigera

Dela via


IDataKeysControl Interface

Definition

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

public interface class IDataKeysControl
public interface IDataKeysControl
type IDataKeysControl = interface
Public Interface IDataKeysControl
Derived

Remarks

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.

Properties

ClientIDRowSuffix

Gets 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 ClientID value by using the Predictable algorithm.

ClientIDRowSuffixDataKeys

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.

Applies to

See also