/
EditorZoneBase.xml
1136 lines (1000 loc) · 101 KB
/
EditorZoneBase.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="EditorZoneBase" FullName="System.Web.UI.WebControls.WebParts.EditorZoneBase">
<TypeSignature Language="C#" Value="public abstract class EditorZoneBase : System.Web.UI.WebControls.WebParts.ToolZone" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit EditorZoneBase extends System.Web.UI.WebControls.WebParts.ToolZone" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class EditorZoneBase
Inherits ToolZone" />
<TypeSignature Language="F#" Value="type EditorZoneBase = class
 inherit ToolZone" />
<TypeSignature Language="C++ CLI" Value="public ref class EditorZoneBase abstract : System::Web::UI::WebControls::WebParts::ToolZone" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.WebControls.WebParts.ToolZone</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Serves as the base class for all zone controls that act as containers for <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class is a specialized zone class that inherits from the <xref:System.Web.UI.WebControls.WebParts.ToolZone> class and provides a base set of behaviors for derived zones that contain <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls. There are several other types of <xref:System.Web.UI.WebControls.WebParts.ToolZone> classes; for more information, see the overview topic for the <xref:System.Web.UI.WebControls.WebParts.ToolZone> class. Like other tool zones, <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zones are not visible when a page is in normal browse mode; they are visible only when a page is in edit display mode. Also like the other tool zones, <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zones can only contain the special type of controls they were designed to contain (in this case, <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls).
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zones provide a special UI for the editing controls they contain. Many of these UI elements are common to all zones in the Web Parts control set. For a detailed discussion of the common UI elements in Web Parts zones, see the class overview topic for the <xref:System.Web.UI.WebControls.WebParts.WebZone> class.
Because the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class is abstract, you cannot use it directly on a Web page. Instead, you must use a control that inherits from the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class and implements its behavior. You can either use the derived zone that is provided in the Web Parts control set, the <xref:System.Web.UI.WebControls.WebParts.EditorZone> control, or you can derive your own custom <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> control.
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class provides a common user interface (UI) to contain special controls that enable end users to edit the properties, layout, appearance, and other attributes of <xref:System.Web.UI.WebControls.WebParts.WebPart> controls. Some properties that apply to the UI refer to verbs, such as the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb%2A>, <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb%2A>, and <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb%2A> properties. Verbs are common actions carried out by users on a page, and are represented in the UI by buttons, links, menu items, or other elements. For example, when users edit properties on a control they can click an apply verb to save the changes.
Several other properties affect text that is displayed at various points in the editing UI. These include the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EmptyZoneText%2A>, <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ErrorText%2A>, <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.HeaderText%2A>, and <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.InstructionText%2A> properties.
Two important properties provide references to related controls. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property is a collection of the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls contained in the zone. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.WebPartToEdit%2A> property is an object reference to a control contained in a <xref:System.Web.UI.WebControls.WebParts.WebPartZone>--which might be a <xref:System.Web.UI.WebControls.WebParts.WebPart> control or any other ASP.NET server control, user control, or custom control currently being edited.
Finally, the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorPartChrome%2A> property references an instance of an <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object that is associated with the zone, and that contains style characteristics of the peripheral UI elements (known as chrome) such as title and border styles for <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone.
A number of the methods of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class are specialized to handle the editing of other controls. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.Close%2A> method changes the page from the edit display mode back to a normal browsing view. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> method is for creating the chrome (peripheral UI elements such as a border, verbs, icons, and a title) that surrounds each <xref:System.Web.UI.WebControls.WebParts.EditorPart> control in the zone. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts%2A> method is an abstract method; derived classes override it to create instances of all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls contained in the zone. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.InvalidateEditorParts%2A> method can be called by a derived class if the collection of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone changes for some programmatic reason, which flags the Web Parts control set to recreate and update the collection of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls. The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged%2A> method is used to set the collection of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls to `null` when the display mode changes from edit mode back to browse mode. Finally, the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnSelectedWebPartChanged%2A> method is used for handling the event when a <xref:System.Web.UI.WebControls.WebParts.WebPart> control is either entering or leaving edit mode. For example, this method is a convenient place to synchronize the property values of a <xref:System.Web.UI.WebControls.WebParts.WebPart> control with the editable values in the associated <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls.
## Examples
The following code example demonstrates several declarative and programmatic uses of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class. Because the class is abstract, the code examples use the derived <xref:System.Web.UI.WebControls.WebParts.EditorZone> class that ships with the Web Parts control set, demonstrating the properties and methods that it inherits from the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class.
The code example has four parts:
- A user control that enables you to change display modes on the Web page.
- A Web page that contains an <xref:System.Web.UI.WebControls.WebParts.EditorZone> control.
- A custom <xref:System.Web.UI.WebControls.WebParts.EditorZone> class that demonstrates some of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class members.
- A description of how the example works in a browser.
The source code for the user control comes from another topic. For this code example to work, you need to obtain the .ascx file for the user control from the [Walkthrough: Changing Display Modes on a Web Parts Page](https://msdn.microsoft.com/library/24e42f74-82dc-4c13-8574-130398985fc0) topic, and place the file in the same folder as the .aspx page in this code example.
The second part of the code example is a Web page that contains a declarative reference to an <xref:System.Web.UI.WebControls.WebParts.EditorZone> control. Near the top of the page is a `Register` directive for the user control. The user control tag is declared in the page with a `<uc1:DisplayModeMenu>` element. Notice that below the `<asp:WebPartZone>` element is an `<asp:EditorZone>` element that contains <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls, and has a variety of tags and properties set to determine its appearance and behavior. Most of the code in the page demonstrates the various programmatic uses of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> properties and methods.
[!code-aspx-csharp[WebParts_EditorZoneBase_Common#1](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#1)]
[!code-aspx-vb[WebParts_EditorZoneBase_Common#1](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#1)]
The third part of the code example is a custom <xref:System.Web.UI.WebControls.WebParts.EditorZone> class that shows how to work with a number of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class members. The custom class derives from <xref:System.Web.UI.WebControls.WebParts.EditorZone> so that it can be used with a zone template in the declarative markup of the Web page. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation; thus, you will notice that the `Register` directive near the top of the Web page does not reference an assembly file. For a walkthrough that demonstrates both methods of compiling, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08).
[!code-csharp[WebParts_EditorZoneBase_Common#12](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#12)]
[!code-vb[WebParts_EditorZoneBase_Common#12](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#12)]
When you load the page in a browser, you can select **Edit Mode** from the drop-down list to switch to edit mode. You can click the verbs menu (the downward arrow) in the title bar of one of the two controls, and click **Edit** to edit the control. When the editing UI is visible, you can see the effects of the various declarative and programmatic uses of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class members.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>If you want to develop a custom zone for hosting <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls, you must determine whether you want to provide zone template support. A zone template is created by types that implement the <see cref="T:System.Web.UI.ITemplate" /> interface, and is necessary if you want to enable page developers using your custom zone to reference <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls within your zone in the declarative markup of a Web page. If you need zone template support, you should inherit from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZone" /> class.
In contrast, if your custom zone and its <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls are going to be self-contained, and they will be created programmatically without any options for page developers to specify controls declaratively in a zone template, then you can inherit directly from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> class. If you do this, it is critical that you implement the <see cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts" /> method so that your custom zone will work.</para>
</block>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebZone" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.CatalogZoneBase" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.IWebEditable" />
<related type="Article" href="https://msdn.microsoft.com/library/24e42f74-82dc-4c13-8574-130398985fc0">Walkthrough: Changing Display Modes on a Web Parts Page</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected EditorZoneBase ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:
 EditorZoneBase();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes the class for use by an inherited class instance. This constructor can only be called by an inherited class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor, when invoked by an inherited class, passes a <xref:System.Web.UI.WebControls.WebParts.WebPartDisplayMode> object to the <xref:System.Web.UI.WebControls.WebParts.WebPartManager> control, which enables the page to display the editing user interface (UI).
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="ApplyVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb ApplyVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb ApplyVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property ApplyVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.ApplyVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ ApplyVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(null)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(null)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that enables end users to apply editing changes to a control in edit mode.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that enables end users to apply changes to a control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The apply verb is referenced by the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb%2A> property on a control derived from the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class. The apply verb saves editing changes that an end user has made in the editing user interface (UI) to a server control that is currently being edited. By default, the apply verb appears in the UI as a <xref:System.Web.UI.WebControls.Button> control. The type of button can be an image, a link, or an actual button; you can set this for all verb buttons in a zone (not for individual buttons) by setting the inherited <xref:System.Web.UI.WebControls.WebParts.WebZone.VerbButtonType%2A> property at the zone level.
The apply verb is a zone-level control, which means that although there might be several <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls, each editing one or more properties for the server control that is in edit mode, the apply verb works universally to apply all changes from all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone to the server control.
## Examples
The following code example demonstrates how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb%2A> property both declaratively and programmatically. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The first part of the code example shows how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb%2A> property declaratively in a Web page. This example customizes the text for the verb.
[!code-aspx-csharp[WebParts_EditorZoneBase_Common#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#2)]
[!code-aspx-vb[WebParts_EditorZoneBase_Common#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#2)]
The second part of the example shows how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ApplyVerb%2A> property programmatically, by using a toggle button to enable or disable it.
[!code-csharp[WebParts_EditorZoneBase_Common#4](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#4)]
[!code-vb[WebParts_EditorZoneBase_Common#4](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#4)]
When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the <xref:System.Web.UI.WebControls.WebParts.EditorZone> control and editing UI are visible, you can see the button that represents the apply verb, and click the **Toggle ApplyVerb Enabled** button to enable or disable it.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CancelVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb CancelVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb CancelVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property CancelVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.CancelVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ CancelVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(null)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(null)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that enables end users to cancel editing changes to a control in edit mode.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that enables end users to cancel editing changes to a control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The cancel verb is referenced by the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb%2A> property on a control derived from the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class. The cancel verb cancels editing changes that an end user has made to a server control in the editing user interface (UI). By default, the cancel verb appears in the UI as a <xref:System.Web.UI.WebControls.Button> control. The type of button can be an image, a link, or an actual button; you can set this for all verb buttons in a zone (not for individual buttons) by setting the inherited <xref:System.Web.UI.WebControls.WebParts.WebZone.VerbButtonType%2A> property at the zone level.
When a user cancels editing changes, none of the changes in the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls are applied to the server control that is being edited. In addition, the page remains in edit display mode, but the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls are hidden and the <xref:System.Web.UI.WebControls.WebParts.WebPart> control that was being edited is no longer selected. This allows an end user to select another <xref:System.Web.UI.WebControls.WebParts.WebPart> control to edit without having to change display modes again.
The cancel verb is a zone-level control, meaning that while there might be several <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls, each editing one or more properties for the server control that is in edit mode, the cancel verb works universally to cancel all changes from all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone.
## Examples
The following code example demonstrates how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb%2A> property both declaratively and programmatically. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The first part of the code example shows how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb%2A> property declaratively in a Web page. This example customizes the text for the verb.
[!code-aspx-csharp[WebParts_EditorZoneBase_Common#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#2)]
[!code-aspx-vb[WebParts_EditorZoneBase_Common#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#2)]
The second part of the example shows how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CancelVerb%2A> property programmatically, by using a toggle button to enable or disable it.
[!code-csharp[WebParts_EditorZoneBase_Common#5](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#5)]
[!code-vb[WebParts_EditorZoneBase_Common#5](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#5)]
When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the <xref:System.Web.UI.WebControls.WebParts.EditorZone> control and editing UI are visible, you can see the button that represents the cancel verb, and click the **Toggle CancelVerb Enabled** button to enable or disable it.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="protected override void Close ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Close() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.Close" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Close ()" />
<MemberSignature Language="F#" Value="override this.Close : unit -> unit" Usage="editorZoneBase.Close " />
<MemberSignature Language="C++ CLI" Value="protected:
 override void Close();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Called when a user clicks a close verb in the header of a zone, this method ends the process of editing <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls, and returns a Web Parts page's display mode to browse mode.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.Close%2A> method provides an implementation for the base method declared in the <xref:System.Web.UI.WebControls.WebParts.ToolZone> class. The implementation simply calls the <xref:System.Web.UI.WebControls.WebParts.WebPartManager.EndWebPartEditing%2A> method, which carries out the steps necessary to end the editing process.
Calling the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.Close%2A> method returns the page to browse mode, and cancels any editing changes made to any <xref:System.Web.UI.WebControls.WebParts.WebPart> controls.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.WebPartManager.EndWebPartEditing" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateChildControls">
<MemberSignature Language="C#" Value="protected internal override void CreateChildControls ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void CreateChildControls() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateChildControls" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub CreateChildControls ()" />
<MemberSignature Language="F#" Value="override this.CreateChildControls : unit -> unit" Usage="editorZoneBase.CreateChildControls " />
<MemberSignature Language="C++ CLI" Value="protected public:
 override void CreateChildControls();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates the set of child controls associated with an <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone.</summary>
<remarks>To be added.</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateEditorPartChrome">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.WebControls.WebParts.EditorPartChrome CreateEditorPartChrome ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.WebControls.WebParts.EditorPartChrome CreateEditorPartChrome() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateEditorPartChrome () As EditorPartChrome" />
<MemberSignature Language="F#" Value="abstract member CreateEditorPartChrome : unit -> System.Web.UI.WebControls.WebParts.EditorPartChrome
override this.CreateEditorPartChrome : unit -> System.Web.UI.WebControls.WebParts.EditorPartChrome" Usage="editorZoneBase.CreateEditorPartChrome " />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual System::Web::UI::WebControls::WebParts::EditorPartChrome ^ CreateEditorPartChrome();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.EditorPartChrome</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a reference to a new <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> object used to render the peripheral user interface (UI) elements around an <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone.</summary>
<returns>An <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> that renders the peripheral UI elements for the zone.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> method returns a new <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object. Chrome includes the following peripheral UI elements that surround each individual <xref:System.Web.UI.WebControls.WebParts.EditorPart> control in the zone: a border; a title bar; the items that appear within the title bar, including optional icons, title text, and a verbs menu; and items appearing in the footer area of a control.
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> method uses the returned <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object to create the chrome around each <xref:System.Web.UI.WebControls.WebParts.EditorPart> control.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome" /> method can be overridden in a derived class to provide a different implementation. For example, you might create a customized <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class to give you more control over the rendering and appearance of the editing UI. If you override the <see cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome" /> method in a derived zone, you could create your custom <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> object in the overridden method.</para>
</block>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartChrome" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateEditorParts">
<MemberSignature Language="C#" Value="protected abstract System.Web.UI.WebControls.WebParts.EditorPartCollection CreateEditorParts ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.WebControls.WebParts.EditorPartCollection CreateEditorParts() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Function CreateEditorParts () As EditorPartCollection" />
<MemberSignature Language="F#" Value="abstract member CreateEditorParts : unit -> System.Web.UI.WebControls.WebParts.EditorPartCollection" Usage="editorZoneBase.CreateEditorParts " />
<MemberSignature Language="C++ CLI" Value="protected:
 abstract System::Web::UI::WebControls::WebParts::EditorPartCollection ^ CreateEditorParts();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.EditorPartCollection</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Provides a base method declaration that derived zones can override to handle the details of creating the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls contained in a zone.</summary>
<returns>An <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartCollection" /> that contains the collection of <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls associated with the zone.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts%2A> method provides no implementation. It is intended to be implemented in a derived class, and should be used to create an instance of the collection of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls contained in a zone, whenever the hosting Web page enters edit mode. The <xref:System.Web.UI.WebControls.WebParts.EditorZone.CreateEditorParts%2A?displayProperty=nameWithType> method provides one example of an implementation of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts%2A> method.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.IWebEditable.CreateEditorParts" />
<altmember cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.InvalidateEditorParts" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="Display">
<MemberSignature Language="C#" Value="protected override bool Display { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Display" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.Display" />
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property Display As Boolean" />
<MemberSignature Language="F#" Value="member this.Display : bool" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.Display" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual property bool Display { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether a <see cref="T:System.Web.UI.WebControls.WebParts.ToolZone" /> control is currently displayed.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Web.UI.WebControls.WebParts.ToolZone" /> is currently displayed; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>To be added.</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ToolZone.Display" />
</Docs>
</Member>
<Member MemberName="EditorPartChrome">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.WebParts.EditorPartChrome EditorPartChrome { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.EditorPartChrome EditorPartChrome" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorPartChrome" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property EditorPartChrome As EditorPartChrome" />
<MemberSignature Language="F#" Value="member this.EditorPartChrome : System.Web.UI.WebControls.WebParts.EditorPartChrome" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorPartChrome" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::UI::WebControls::WebParts::EditorPartChrome ^ EditorPartChrome { System::Web::UI::WebControls::WebParts::EditorPartChrome ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.EditorPartChrome</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the instance of the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class associated with the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone.</summary>
<value>An <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> that contains style characteristics for the chrome elements of <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls in a zone.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorPartChrome%2A> property provides a reference to the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object associated with a zone. When the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> method is called, it creates an instance of the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class, and this instance is used to render the peripheral user interface (UI) elements (also called the chrome) for all <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone.
The chrome elements for an individual <xref:System.Web.UI.WebControls.WebParts.EditorPart> control include its border and other items in its header area, such as verbs, icons, and title text, as well as its footer area and its included elements.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="EditorParts">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.WebParts.EditorPartCollection EditorParts { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.EditorPartCollection EditorParts" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property EditorParts As EditorPartCollection" />
<MemberSignature Language="F#" Value="member this.EditorParts : System.Web.UI.WebControls.WebParts.EditorPartCollection" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::UI::WebControls::WebParts::EditorPartCollection ^ EditorParts { System::Web::UI::WebControls::WebParts::EditorPartCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.EditorPartCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of all the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls contained in an <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone.</summary>
<value>An <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartCollection" /> that contains all the individual <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls in a zone.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property provides a reference to a collection of all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone. It references both the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls provided with the Web Parts control set, and any custom <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls that are added to the zone. Because the collection is read-only, developers who want to create custom <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls for general editing purposes and add them to the collection should override the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts%2A> method.
If you design custom <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls to edit a specific <xref:System.Web.UI.WebControls.WebParts.WebPart> control, you should override the members of the <xref:System.Web.UI.WebControls.WebParts.IWebEditable> interface--the <xref:System.Web.UI.WebControls.WebParts.IWebEditable.CreateEditorParts%2A> method and the <xref:System.Web.UI.WebControls.WebParts.IWebEditable.WebBrowsableObject%2A> property--in the <xref:System.Web.UI.WebControls.WebParts.WebPart> control. The reason to override these members is to enable your <xref:System.Web.UI.WebControls.WebParts.WebPart> control to create the custom <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls and add them to the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> collection when your control is being edited, and to provide the editing controls with an object reference to the <xref:System.Web.UI.WebControls.WebParts.WebPart> control they are editing. If you want to add a custom <xref:System.Web.UI.WebControls.WebParts.EditorPart> control to edit a server control that does not inherit from the <xref:System.Web.UI.WebControls.WebParts.WebPart> class, you must implement the <xref:System.Web.UI.WebControls.WebParts.IWebEditable> interface in the class just as you would for a <xref:System.Web.UI.WebControls.WebParts.WebPart> control.
> [!NOTE]
> Note that any <xref:System.Web.UI.WebControls.WebParts.EditorPart> that is added to the collection of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in an implementation of the <xref:System.Web.UI.WebControls.WebParts.IWebEditable.CreateEditorParts%2A> method must have a value assigned to its ID property, otherwise an exception will be thrown when the collection is assigned to the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property.
## Examples
The following code example demonstrates how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property programmatically. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The first part of the code example demonstrates that the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property contains references to all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls that are referenced declaratively in the Web page.
[!code-aspx-csharp[WebParts_EditorZoneBase_Common#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#2)]
[!code-aspx-vb[WebParts_EditorZoneBase_Common#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#2)]
The second part of the code example programmatically accesses the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property and lists the ID of each control in a <xref:System.Web.UI.WebControls.Label> control.
[!code-csharp[WebParts_EditorZoneBase_Common#6](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#6)]
[!code-vb[WebParts_EditorZoneBase_Common#6](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#6)]
When you load the page in a browser, you can click the **Display EditorParts Collection** button to list the IDs of all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls referenced in the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> property.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">An <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> being added to the collection does not have a value assigned to its ID property.</exception>
<altmember cref="T:System.Web.UI.WebControls.WebParts.IWebEditable" />
<altmember cref="M:System.Web.UI.WebControls.WebParts.IWebEditable.CreateEditorParts" />
<altmember cref="M:System.Web.UI.WebControls.WebParts.GenericWebPart.CreateEditorParts" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="EmptyZoneText">
<MemberSignature Language="C#" Value="public override string EmptyZoneText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string EmptyZoneText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.EmptyZoneText" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property EmptyZoneText As String" />
<MemberSignature Language="F#" Value="member this.EmptyZoneText : string with get, set" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.EmptyZoneText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ EmptyZoneText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a message that appears when a zone contains no controls.</summary>
<value>A string containing the message that appears in an empty zone. A default culture-specific string is supplied by the .NET Framework.</value>
<remarks>To be added.</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebZone.EmptyZoneText" />
</Docs>
</Member>
<Member MemberName="ErrorText">
<MemberSignature Language="C#" Value="public virtual string ErrorText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ErrorText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.ErrorText" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ErrorText As String" />
<MemberSignature Language="F#" Value="member this.ErrorText : string with get, set" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.ErrorText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ ErrorText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text of a zone-level error message to display at the top of the editing user interface (UI).</summary>
<value>A localized string that contains the error message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.ErrorText%2A> property contains the text of an error message that can be displayed in the UI if an error occurs while rendering controls derived from the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class. The error message is displayed at the top of the zone if an error occurs in any of the individual <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls contained in the zone. In addition, individual <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls can display their own error messages near the control that receives an error.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <xref:System.ComponentModel.LocalizableAttribute> and [Globalization and Localization](https://docs.microsoft.com/previous-versions/aspnet/c6zyy3s9(v=vs.100)).
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="HeaderText">
<MemberSignature Language="C#" Value="public override string HeaderText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string HeaderText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.HeaderText" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property HeaderText As String" />
<MemberSignature Language="F#" Value="member this.HeaderText : string with get, set" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.HeaderText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ HeaderText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text for the header area of a zone.</summary>
<value>A string that contains the header text for the zone. The default is an empty string ("").</value>
<remarks>To be added.</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebZone.HeaderText" />
</Docs>
</Member>
<Member MemberName="InstructionText">
<MemberSignature Language="C#" Value="public override string InstructionText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string InstructionText" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.InstructionText" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property InstructionText As String" />
<MemberSignature Language="F#" Value="member this.InstructionText : string with get, set" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.InstructionText" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ InstructionText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text in a <see cref="T:System.Web.UI.WebControls.WebParts.ToolZone" /> control that provides directions for end users.</summary>
<value>A string that contains the directions for end users. A default value appropriate to specific tool zones is provided by derived <see cref="T:System.Web.UI.WebControls.WebParts.ToolZone" /> classes.</value>
<remarks>To be added.</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ToolZone.InstructionText" />
</Docs>
</Member>
<Member MemberName="InvalidateEditorParts">
<MemberSignature Language="C#" Value="protected void InvalidateEditorParts ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void InvalidateEditorParts() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.InvalidateEditorParts" />
<MemberSignature Language="VB.NET" Value="Protected Sub InvalidateEditorParts ()" />
<MemberSignature Language="F#" Value="member this.InvalidateEditorParts : unit -> unit" Usage="editorZoneBase.InvalidateEditorParts " />
<MemberSignature Language="C++ CLI" Value="protected:
 void InvalidateEditorParts();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Sets the collection of <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls associated with an <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone to <see langword="null" />, which results in the <see cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts" /> method being called to recreate the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.InvalidateEditorParts%2A> method can be called by derived classes if the list of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls associated with an <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone has changed for some reason, and the derived class needs to get an updated list of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls. The derived class should call <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.InvalidateEditorParts%2A>, which sets the current collection to `null`. The next time that the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts%2A> collection is accessed, the Web Parts control set automatically invokes the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts%2A> method to create the updated collection.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorParts" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="LoadViewState">
<MemberSignature Language="C#" Value="protected override void LoadViewState (object savedState);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void LoadViewState(object savedState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub LoadViewState (savedState As Object)" />
<MemberSignature Language="F#" Value="override this.LoadViewState : obj -> unit" Usage="editorZoneBase.LoadViewState savedState" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void LoadViewState(System::Object ^ savedState);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">The previously saved state.</param>
<summary>Loads previously saved state information for a zone.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see [ASP.NET State Management Overview](https://docs.microsoft.com/previous-versions/aspnet/75x4ha6s(v=vs.100)).
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.LoadViewState%2A> method overrides the base method to check whether the page is being loaded because an OK verb, a cancel verb, or an apply verb was clicked in the zone. If so, the method handles the state associated with each respective scenario.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The size of the <paramref name="savedState" /> object does not equal the size of the current view-state object.</exception>
<altmember cref="M:System.Web.UI.Control.LoadViewState(System.Object)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="OKVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb OKVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb OKVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property OKVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.OKVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ OKVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(null)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(null)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that applies editing changes to a control in edit mode, and hides the editing user interface (UI).</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that applies editing changes to a control and hides the editing UI.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The OK verb is referenced by the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb%2A> property on a control derived from the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class. It is similar to the apply verb, in that when a user clicks it, it applies editing changes that the user has made to a server control. In addition, the editing controls are hidden, the <xref:System.Web.UI.WebControls.WebParts.WebPart> control that was being edited is no longer selected (which allows the user to edit another control), and the page remains in edit mode.
By default, the OK verb appears in the UI as a <xref:System.Web.UI.WebControls.Button> control. The type of button can be an image, a link, or an actual button; you can set this for all verb buttons in a zone (not for individual buttons) by setting the inherited <xref:System.Web.UI.WebControls.WebParts.WebZone.VerbButtonType%2A> property at the zone level.
The OK verb is a zone-level control, meaning that while there might be several <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls, each editing one or more properties for the server control that is in edit mode, the OK verb works universally to apply all changes from all the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone, and to hide all the controls except for the zone itself.
## Examples
The following code example demonstrates how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb%2A> property both declaratively and programmatically. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The first part of the code example shows how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb%2A> property declaratively in a Web page. This example customizes the text for the verb.
[!code-aspx-csharp[WebParts_EditorZoneBase_Common#2](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#2)]
[!code-aspx-vb[WebParts_EditorZoneBase_Common#2](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#2)]
The second part of the example shows how to access the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OKVerb%2A> programmatically, by using a toggle button to enable or disable it.
[!code-csharp[WebParts_EditorZoneBase_Common#7](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/editorzonebasecs.aspx#7)]
[!code-vb[WebParts_EditorZoneBase_Common#7](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/editorzonebasevb.aspx#7)]
When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the <xref:System.Web.UI.WebControls.WebParts.EditorZone> control and editing UI are visible, you can see the button that represents the OK verb, and click the **Toggle OKVerb Enabled** button to enable or disable it.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="OnDisplayModeChanged">
<MemberSignature Language="C#" Value="protected override void OnDisplayModeChanged (object sender, System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnDisplayModeChanged(object sender, class System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged(System.Object,System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnDisplayModeChanged (sender As Object, e As WebPartDisplayModeEventArgs)" />
<MemberSignature Language="F#" Value="override this.OnDisplayModeChanged : obj * System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs -> unit" Usage="editorZoneBase.OnDisplayModeChanged (sender, e)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void OnDisplayModeChanged(System::Object ^ sender, System::Web::UI::WebControls::WebParts::WebPartDisplayModeEventArgs ^ e);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sender" Type="System.Object" />
<Parameter Name="e" Type="System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs" />
</Parameters>
<Docs>
<param name="sender">An <see cref="T:System.Object" /> that raises the <see cref="E:System.Web.UI.WebControls.WebParts.WebPartManager.DisplayModeChanged" /> event.</param>
<param name="e">A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.WebParts.WebPartManager.DisplayModeChanged" /> event and destroys all <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> and child controls in the zone in preparation for a Web page to enter or exit the edit display mode.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged%2A> method provides an implementation for the base method in the <xref:System.Web.UI.WebControls.WebParts.ToolZone> class.
The main purpose of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged%2A> method is to prepare a Web page to enter or exit the edit display mode. The method destroys all controls contained in the zone and then calls the base method, which raises the <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DisplayModeChanged> event in the <xref:System.Web.UI.WebControls.WebParts.WebPartManager> control.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged%2A> method in a derived class. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The custom editor zone derives from the <xref:System.Web.UI.WebControls.WebParts.EditorZone> class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged%2A> method, setting the background color of the zone to a specified color, and then calls the base method, which destroys all child and <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in preparation for entering or exiting edit display mode.
[!code-csharp[WebParts_EditorZoneBase_Common#13](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#13)]
[!code-vb[WebParts_EditorZoneBase_Common#13](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#13)]
When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the <xref:System.Web.UI.WebControls.WebParts.EditorZone> control and editing user interface (UI) are visible, you can see that the zone has the background color specified in the code.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnDisplayModeChanged(System.Object,System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs)" /> method can be overridden or called programmatically in a custom editor zone control that inherits from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> class or the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZone" /> class.</para>
</block>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="OnPreRender">
<MemberSignature Language="C#" Value="protected internal override void OnPreRender (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void OnPreRender(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnPreRender(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub OnPreRender (e As EventArgs)" />
<MemberSignature Language="F#" Value="override this.OnPreRender : EventArgs -> unit" Usage="editorZoneBase.OnPreRender e" />
<MemberSignature Language="C++ CLI" Value="protected public:
 override void OnPreRender(EventArgs ^ e);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.Control.PreRender" /> event, and calls the <see cref="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.PerformPreRender" /> method for the chrome elements of the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls.</summary>
<remarks>To be added.</remarks>
<altmember cref="E:System.Web.UI.Control.PreRender" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="OnSelectedWebPartChanged">
<MemberSignature Language="C#" Value="protected override void OnSelectedWebPartChanged (object sender, System.Web.UI.WebControls.WebParts.WebPartEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnSelectedWebPartChanged(object sender, class System.Web.UI.WebControls.WebParts.WebPartEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnSelectedWebPartChanged(System.Object,System.Web.UI.WebControls.WebParts.WebPartEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnSelectedWebPartChanged (sender As Object, e As WebPartEventArgs)" />
<MemberSignature Language="F#" Value="override this.OnSelectedWebPartChanged : obj * System.Web.UI.WebControls.WebParts.WebPartEventArgs -> unit" Usage="editorZoneBase.OnSelectedWebPartChanged (sender, e)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void OnSelectedWebPartChanged(System::Object ^ sender, System::Web::UI::WebControls::WebParts::WebPartEventArgs ^ e);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sender" Type="System.Object" />
<Parameter Name="e" Type="System.Web.UI.WebControls.WebParts.WebPartEventArgs" />
</Parameters>
<Docs>
<param name="sender">An <see cref="T:System.Object" /> that raises the <see cref="E:System.Web.UI.WebControls.WebParts.WebPartManager.SelectedWebPartChanged" /> event.</param>
<param name="e">A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.WebParts.WebPartManager.SelectedWebPartChanged" /> event and sets the <see cref="P:System.Web.UI.WebControls.WebParts.EditorZoneBase.EditorParts" /> collection to <see langword="null" /> in the zone in preparation for a <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control to enter or exit edit mode.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnSelectedWebPartChanged%2A> method enables you to provide custom handling for the event that occurs when an individual <xref:System.Web.UI.WebControls.WebParts.WebPart> control enters or exits edit mode.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnSelectedWebPartChanged%2A> method in a derived class. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The custom editor zone derives from the <xref:System.Web.UI.WebControls.WebParts.EditorZone> class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnSelectedWebPartChanged%2A> method, setting the background color of the specific control that is being edited, and then calls the base method.
[!code-csharp[WebParts_EditorZoneBase_Common#14](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#14)]
[!code-vb[WebParts_EditorZoneBase_Common#14](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#14)]
When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the <xref:System.Web.UI.WebControls.WebParts.EditorZone> and editing user interface (UI) are visible, you can see that the selected control has the background color specified in the code.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.OnSelectedWebPartChanged(System.Object,System.Web.UI.WebControls.WebParts.WebPartEventArgs)" /> method can be overridden or called programmatically in a custom editor zone control that inherits from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> class or the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZone" /> class.</para>
</block>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="RaisePostBackEvent">
<MemberSignature Language="C#" Value="protected override void RaisePostBackEvent (string eventArgument);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void RaisePostBackEvent(string eventArgument) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.RaisePostBackEvent(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub RaisePostBackEvent (eventArgument As String)" />
<MemberSignature Language="F#" Value="override this.RaisePostBackEvent : string -> unit" Usage="editorZoneBase.RaisePostBackEvent eventArgument" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void RaisePostBackEvent(System::String ^ eventArgument);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventArgument" Type="System.String" />
</Parameters>
<Docs>
<param name="eventArgument">A <see cref="T:System.String" /> that contains the argument for the event.</param>
<summary>Carries out the actions associated with one of the zone verbs, or raises an event that posts back to the server.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.RaisePostBackEvent%2A> method carries out the respective actions associated with the OK verb, the cancel verb, or the apply verb, if one of these verbs was clicked in the user interface (UI). Otherwise, it raises an event that posts back to the server.
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="Render">
<MemberSignature Language="C#" Value="protected internal override void Render (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void Render(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.Render(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub Render (writer As HtmlTextWriter)" />
<MemberSignature Language="F#" Value="override this.Render : System.Web.UI.HtmlTextWriter -> unit" Usage="editorZoneBase.Render writer" />
<MemberSignature Language="C++ CLI" Value="protected public:
 override void Render(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that receives the zone's content.</param>
<summary>Renders the zone to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.Render%2A> method overrides the base method from the <xref:System.Web.UI.WebControls.WebControl> class to call the <xref:System.Web.UI.Page.VerifyRenderingInServerForm%2A> method, which verifies that an HTML form is rendered for the zone control at run time. After the verification, the method then calls the base method to render the full contents of the zone.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.Render(System.Web.UI.HtmlTextWriter)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="RenderBody">
<MemberSignature Language="C#" Value="protected override void RenderBody (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void RenderBody(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.RenderBody(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub RenderBody (writer As HtmlTextWriter)" />
<MemberSignature Language="F#" Value="override this.RenderBody : System.Web.UI.HtmlTextWriter -> unit" Usage="editorZoneBase.RenderBody writer" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void RenderBody(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that receives the zone's body content.</param>
<summary>Overrides the base method to render the body area of a zone derived from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.RenderBody%2A> method renders the body area of an <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone, which is the main content area between the header and footer areas and contains <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls.
The <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.RenderBody%2A> method overrides the base method in the <xref:System.Web.UI.WebControls.WebParts.WebZone> class to provide specialized rendering that addresses layout and style attributes that apply only to <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zones. The method renders a table that contains the entire contents of the body, and within that table, it sets different attribute values depending on various conditions, including the current display mode of the page. If there are no contained controls, it renders the value of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.EmptyZoneText%2A> property.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.RenderBody%2A> method in a derived class. For the full code required to run the example, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class overview topic.
The custom editor zone derives from the <xref:System.Web.UI.WebControls.WebParts.EditorZone> class so that it can be used with a zone template in the declarative markup of the Web page. The custom class overrides the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.RenderBody%2A> method, adding an HTML `<hr />` element to create a line between the header and body of the zone. It then calls the base method to render the rest of the zone's body contents.
[!code-csharp[WebParts_EditorZoneBase_Common#15](~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/CS/myeditorzone.cs#15)]
[!code-vb[WebParts_EditorZoneBase_Common#15](~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorZoneBase_Common/VB/myeditorzone.vb#15)]
When you load the page in a browser, you can select **Edit Mode** in the drop-down list control to switch to edit mode. You can click the verbs menu (the down arrow) in the title bar of one of the controls, and click **Edit** to edit the selected control. When the <xref:System.Web.UI.WebControls.WebParts.EditorZone> control and editing user interface (UI) are visible, you can see the line created between the header and body of the editor zone.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.RenderBody(System.Web.UI.HtmlTextWriter)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="RenderVerbs">
<MemberSignature Language="C#" Value="protected override void RenderVerbs (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void RenderVerbs(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorZoneBase.RenderVerbs(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub RenderVerbs (writer As HtmlTextWriter)" />
<MemberSignature Language="F#" Value="override this.RenderVerbs : System.Web.UI.HtmlTextWriter -> unit" Usage="editorZoneBase.RenderVerbs writer" />