IDataKeysControl IDataKeysControl IDataKeysControl IDataKeysControl Interface

定义

定义一些属性,用于指定 ASP.NET 如何创建数据绑定控件的客户端 ID。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
派生

注解

IDataKeysControl接口定义数据绑定控件实现的两个属性, 以便您可以指定如何创建客户端 ID。The IDataKeysControl interface defines two properties that data-bound controls implement to let you specify how a client ID is created. 显示控件的多个实例的数据绑定控件必须为该控件的每个实例创建一个 ID。A data-bound control that displays multiple instances of a control must create an ID for each instance of the control. 该 ID 必须是唯一的, 才能从客户端脚本中启用对控件的访问。That ID must be unique in order to enable access to the control from client script.

通过属性, 您可以指定数据字段的名称或名称, 这些数据字段的值将包含在该ClientID属性的生成值中。 ClientIDRowSuffixThe 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. 例如, 当显示 products 数据表中的记录时, 可以将分配ProductID ClientIDRowSuffix给属性。For example, when you display records from a products data table, you can assign ProductID to the ClientIDRowSuffix property. 在这种情况下, 数据绑定控件的每个实例都可以由ProductID字段中的值标识。In that case, each instance of the data-bound control can be identified by the value from the ProductID field.

属性

ClientIDRowSuffix ClientIDRowSuffix ClientIDRowSuffix ClientIDRowSuffix

获取数据字段的名称,在 ASP.NET 使用 Predictable 算法生成 ClientID 值时,这些字段的值用于唯一标识数据绑定控件的每个实例。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 ClientIDRowSuffixDataKeys ClientIDRowSuffixDataKeys ClientIDRowSuffixDataKeys

获取数据值的集合,在 ASP.NET 生成 ClientID 值时,这些数据值用于唯一标识数据绑定控件的每个实例。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.

适用于

另请参阅