語言

ListControlDesigner.DataBind(BaseDataBoundControl) 方法

定義

將指定的控制項綁定到設計時的資料來源。

protected:
 override void DataBind(System::Web::UI::WebControls::BaseDataBoundControl ^ dataBoundControl);
protected override void DataBind(System.Web.UI.WebControls.BaseDataBoundControl dataBoundControl);
override this.DataBind : System.Web.UI.WebControls.BaseDataBoundControl -> unit
Protected Overrides Sub DataBind (dataBoundControl As BaseDataBoundControl)

參數

dataBoundControl
BaseDataBoundControl

相關控制源自 ListControl,或該控制的副本。

備註

對於DataBoundControlDesigner基底類別,方法設定DataBindDataSource物件的 DataSourceID and DataBoundControl 屬性以參考設計時資料來源,然後呼叫該BaseDataBoundControl.DataBind方法,然後將 and DataSource 屬性恢復DataSourceID為原始值。

然而,對於類別 ListControlDesigner 來說,這個 DataBind 方法沒有功能,因為 ListItem 物件只是被加入 Items 集合。

適用於

另請參閱