IPersistedSelector.DataKey 属性
定义
获取或设置数据绑定控件中所选记录的数据键值。Gets or sets the data-key value for the selected record in a data-bound control.
public:
property System::Web::UI::WebControls::DataKey ^ DataKey { System::Web::UI::WebControls::DataKey ^ get(); void set(System::Web::UI::WebControls::DataKey ^ value); };
public System.Web.UI.WebControls.DataKey DataKey { get; set; }
member this.DataKey : System.Web.UI.WebControls.DataKey with get, set
Public Property DataKey As DataKey
属性值
数据绑定控件中所选记录的数据键值。The data-key value for the selected record in a data-bound control.
注解
DataKey属性不同于数据绑定控件所进行的默认选择,因为所选的项可在分页之间保持不变,并且项可能不在当前页上。The DataKey property differs from the default selection made by the data-bound control because the item selected can be persisted across paging and the item may not be on the current page.