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.

屬性可讓您指定資料欄位的名稱或名稱, 其值會包含在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 使用 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.

適用於

另請參閱