Assembly: System.Web (in System.Web.dll)
The property provides a reference to a collection of all the EditorPart controls in the zone. It references both the EditorPart controls provided with the Web Parts control set, and any custom EditorPart controls that are added to the zone. Because the collection is read-only, developers who want to create custom EditorPart controls for general editing purposes and add them to the collection should override the CreateEditorParts method.
If you design custom EditorPart controls to edit a specific WebPart control, you should override the members of the IWebEditable interface--the CreateEditorParts method and the WebBrowsableObject property--in the WebPart control. The reason to override these members is to enable your WebPart control to create the custom EditorPart controls and add them to the collection when your control is being edited, and to provide the editing controls with an object reference to the WebPart control they are editing. If you want to add a custom EditorPart control to edit a server control that does not inherit from the WebPart class, you must implement the IWebEditable interface in the class just as you would for a WebPart control.
The following code example demonstrates how to access the property programmatically. For the full code required to run the example, see the Example section of the EditorZoneBase class overview topic.
The first part of the code example demonstrates that the property contains references to all the EditorPart controls that are referenced declaratively in the Web page.
<aspSample:MyEditorZone ID="EditorZone1" runat="server"> <ApplyVerb Text="Apply Changes" /> <CancelVerb Text="Cancel Changes" /> <OKVerb Text="Finished" /> <ZoneTemplate> <asp:AppearanceEditorPart ID="AppearanceEditorPart1" runat="server" /> <asp:LayoutEditorPart ID="LayoutEditorPart1" runat="server" /> </ZoneTemplate> </aspSample:MyEditorZone>
The second part of the code example programmatically accesses the property and lists the ID of each control in a Label control.
When you load the page in a browser, you can click the Display EditorParts Collection button to list the IDs of all the EditorPart controls referenced in the property.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.