EditorZone.CreateEditorParts 方法

定義

以頁面保存格式,建立在區域樣板中宣告的所有 EditorPart 控制項。

protected:
 override System::Web::UI::WebControls::WebParts::EditorPartCollection ^ CreateEditorParts();
protected override System.Web.UI.WebControls.WebParts.EditorPartCollection CreateEditorParts ();
override this.CreateEditorParts : unit -> System.Web.UI.WebControls.WebParts.EditorPartCollection
Protected Overrides Function CreateEditorParts () As EditorPartCollection

傳回

EditorPartCollection,包含在區域樣板中宣告之所有 EditorPart 控制項的參考。

例外狀況

目前的 EditorPart 控制項並沒有 ID。

備註

方法 CreateEditorParts 會覆寫基底方法,只 EditorPart 建立區域範本內宣告的控制項。 新增至區域的任何其他 EditorPart 控制項都必須以程式設計方式新增。 例如,在 控制項中 WebPartIWebEditable 作 介面,即可完成此作業。 然後,在覆寫 CreateEditorParts 的 方法中,您可以將自訂 EditorPart 控制項的集合新增至區域。

適用於

另請參閱