語言

WebPart.CreateEditorParts 方法

定義

回傳一組自訂 EditorPart 控制項,可用於編輯 WebPart 控制項時的編輯。

public:
 virtual System::Web::UI::WebControls::WebParts::EditorPartCollection ^ CreateEditorParts();
public virtual System.Web.UI.WebControls.WebParts.EditorPartCollection CreateEditorParts();
abstract member CreateEditorParts : unit -> System.Web.UI.WebControls.WebParts.EditorPartCollection
override this.CreateEditorParts : unit -> System.Web.UI.WebControls.WebParts.EditorPartCollection
Public Overridable Function CreateEditorParts () As EditorPartCollection

傳回

一個EditorPartCollection包含與控制EditorPart項相關聯的自訂WebPart控制項。

實作

備註

開發者可以使用此方法建立自訂控制項實例EditorPart,並將其與控制項關聯。WebPart 當使用者點擊控制項上的 WebPart 編輯動詞時,會呼叫此方法。

Note

任何在此方法中建立的新控制項實例 EditorPart ,必須先為其 ID 屬性指派值,才能將其加入 EditorParts 集合。

關於使用該 CreateEditorParts 方法的程式碼範例,請參閱 EditorPart 類別概述。

適用於

另請參閱