IDataKeysControl IDataKeysControl IDataKeysControl IDataKeysControl Interface

定義

定義屬性,這些屬性會指定 ASP.NET 建立資料繫結控制項之用戶端識別碼的方式。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介面會定義兩個資料繫結的控制項實作,讓您指定用戶端識別碼的建立方式的屬性。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.

ClientIDRowSuffix屬性可讓您指定的名稱或其值會包含在產生值的資料欄位名稱ClientID屬性。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. 例如,當您顯示產品資料表格中的記錄,您可以指派ProductIDClientIDRowSuffix屬性。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 使用 ClientID 演算法產生 Predictable 值時,用來識別資料繫結控制項的每個唯一的執行個體。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.

適用於

另請參閱