Share via


HierarchicalDataBoundControlDesigner.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

要繫結至設計階段資料來源的 HierarchicalDataBoundControl

備註

方法 DataBind 會先設定 DataSource 控制項的 HierarchicalDataBoundControl 屬性,以參考設計階段資料來源,並將 屬性設定 DataSourceIDnull 。 會 DataBind 呼叫 DataBind 衍生自 HierarchicalDataBoundControl 類別的 控制項方法,以系結至設計階段資料來源。 最後,它會還原 和 DataSourceID 屬性的原始值 DataSource

參數 dataBoundControl 是衍生自 HierarchicalDataBoundControl 與這個設計工具相關聯之類別的控制項,或是該控制項的複本。

適用於

另請參閱