EditorZone.CreateEditorParts Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates all the EditorPart controls declared within a zone template in page persistence format.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

protected override EditorPartCollection CreateEditorParts()

Return Value

Type: System.Web.UI.WebControls.WebParts.EditorPartCollection

An EditorPartCollection that contains references to all the EditorPart controls declared within the zone template.

Exception Condition

The current EditorPart control does not have an ID.

The CreateEditorParts method overrides the base method to create only the EditorPart controls that are declared within the zone template. Any other EditorPart controls added to the zone must be added programmatically. This can be done, for example, by implementing the IWebEditable interface in a WebPart control. Then, in the overridden CreateEditorParts method, you can add a collection of custom EditorPart controls to a zone.

.NET Framework
Available since 2.0
Return to top