/
PersistChildrenAttribute.xml
408 lines (374 loc) · 26.3 KB
/
PersistChildrenAttribute.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
<Type Name="PersistChildrenAttribute" FullName="System.Web.UI.PersistChildrenAttribute">
<TypeSignature Language="C#" Value="public sealed class PersistChildrenAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit PersistChildrenAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.PersistChildrenAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class PersistChildrenAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type PersistChildrenAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class PersistChildrenAttribute sealed : Attribute" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Class)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Class)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Defines an attribute that is used by ASP.NET server controls to indicate at design time whether nested content that is contained within a server control corresponds to controls or to properties of the server control. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.PersistChildrenAttribute> is used in combination with the <xref:System.Web.UI.ParseChildrenAttribute> to determine how nested content of a control is interpreted. If <xref:System.Web.UI.PersistChildrenAttribute> is `true` and <xref:System.Web.UI.ParseChildrenAttribute> is `false`, the nested content contained within an ASP.NET server control is persisted as controls. If <xref:System.Web.UI.PersistChildrenAttribute> is `false` and <xref:System.Web.UI.ParseChildrenAttribute> is `true`, the nested content is persisted as properties of the server control. For more information about using attributes, see [Attributes](/dotnet/standard/attributes/).
## Examples
The code example in this section contains two parts. The first code example demonstrates how to set the metadata of a custom control so that at design time, its nested content is persisted as properties of the control. The second code example demonstrates how to use classes in an ASP.NET page.
The following code example demonstrates how to apply the <xref:System.Web.UI.PersistChildrenAttribute> attribute so that none of a custom server control's nested controls are persisted as nested controls. The custom server control named `CollectionPropertyControl` has the <xref:System.Web.UI.PersistChildrenAttribute> attribute set to `false` so that the `Employee` objects that are added are persisted as nested elements.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/CS/persistchildren_1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/VB/persistchildren_1.vb" id="Snippet1":::
The following code example demonstrates how to use the `CollectionPropertyControl` and `Employee` classes in an ASP.NET page.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/CS/persistchildren.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/VB/persistchildren.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Attribute" />
<altmember cref="T:System.Web.UI.ParseChildrenAttribute" />
<related type="Article" href="/dotnet/standard/attributes/">Extending Metadata Using Attributes</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2013/c5z9s1h4(v=vs.120)">Design-Time Architecture</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.PersistChildrenAttribute" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PersistChildrenAttribute (bool persist);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool persist) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.PersistChildrenAttribute.#ctor(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (persist As Boolean)" />
<MemberSignature Language="F#" Value="new System.Web.UI.PersistChildrenAttribute : bool -> System.Web.UI.PersistChildrenAttribute" Usage="new System.Web.UI.PersistChildrenAttribute persist" />
<MemberSignature Language="C++ CLI" Value="public:
 PersistChildrenAttribute(bool persist);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="persist" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="persist">
<see langword="true" /> to persist the nested content as nested controls; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.PersistChildrenAttribute" /> class using a Boolean value indicating whether to persist nested content as nested controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to apply the <xref:System.Web.UI.PersistChildrenAttribute> attribute for a custom server control named `CollectionPropertyControl`.
This code example is part of a larger example provided for the <xref:System.Web.UI.PersistChildrenAttribute> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/CS/persistchildren_1.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/VB/persistchildren_1.vb" id="Snippet2":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.Control" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2008/4yf3whkx(v=vs.90)">Custom Control Development</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PersistChildrenAttribute (bool persist, bool usesCustomPersistence);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool persist, bool usesCustomPersistence) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.PersistChildrenAttribute.#ctor(System.Boolean,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (persist As Boolean, usesCustomPersistence As Boolean)" />
<MemberSignature Language="F#" Value="new System.Web.UI.PersistChildrenAttribute : bool * bool -> System.Web.UI.PersistChildrenAttribute" Usage="new System.Web.UI.PersistChildrenAttribute (persist, usesCustomPersistence)" />
<MemberSignature Language="C++ CLI" Value="public:
 PersistChildrenAttribute(bool persist, bool usesCustomPersistence);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="persist" Type="System.Boolean" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<Parameter Name="usesCustomPersistence" Type="System.Boolean" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</Parameters>
<Docs>
<param name="persist">
<see langword="true" /> to persist nested content as nested controls; otherwise, <see langword="false" />.</param>
<param name="usesCustomPersistence">
<see langword="true" /> to use customized persistence; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.PersistChildrenAttribute" /> class using two Boolean values. One indicating whether to persist nested content as nested controls and the other indicating whether to use a custom persistence method.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Default">
<MemberSignature Language="C#" Value="public static readonly System.Web.UI.PersistChildrenAttribute Default;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Web.UI.PersistChildrenAttribute Default" />
<MemberSignature Language="DocId" Value="F:System.Web.UI.PersistChildrenAttribute.Default" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Default As PersistChildrenAttribute " />
<MemberSignature Language="F#" Value=" staticval mutable Default : System.Web.UI.PersistChildrenAttribute" Usage="System.Web.UI.PersistChildrenAttribute.Default" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Web::UI::PersistChildrenAttribute ^ Default;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.PersistChildrenAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates the default attribute state. The <see cref="F:System.Web.UI.PersistChildrenAttribute.Default" /> field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value for the <xref:System.Web.UI.PersistChildrenAttribute.Default> field is `Yes`, indicating that nested content is persisted at design time.
]]></format>
</remarks>
<altmember cref="F:System.Web.UI.PersistChildrenAttribute.Yes" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object obj);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.PersistChildrenAttribute.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (obj As Object) As Boolean" />
<MemberSignature Language="F#" Value="override this.Equals : obj -> bool" Usage="persistChildrenAttribute.Equals obj" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool Equals(System::Object ^ obj);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">The object to compare with the current object.</param>
<summary>Determines whether the specified object is equal to the current object.</summary>
<returns>
<see langword="true" /> if <paramref name="obj" /> is equal to the current object; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.PersistChildrenAttribute.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -> int" Usage="persistChildrenAttribute.GetHashCode " />
<MemberSignature Language="C++ CLI" Value="public:
 override int GetHashCode();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Serves as a hash function for the <see cref="T:System.Web.UI.PersistChildrenAttribute" /> class.</summary>
<returns>A hash code for the <see cref="T:System.Web.UI.PersistChildrenAttribute" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsDefaultAttribute">
<MemberSignature Language="C#" Value="public override bool IsDefaultAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsDefaultAttribute() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.PersistChildrenAttribute.IsDefaultAttribute" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsDefaultAttribute () As Boolean" />
<MemberSignature Language="F#" Value="override this.IsDefaultAttribute : unit -> bool" Usage="persistChildrenAttribute.IsDefaultAttribute " />
<MemberSignature Language="C++ CLI" Value="public:
 override bool IsDefaultAttribute();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a value indicating whether the value of the current instance of the <see cref="T:System.Web.UI.PersistChildrenAttribute" /> class is the default value of the derived class.</summary>
<returns>
<see langword="true" /> if the value of the current instance of the <see cref="T:System.Web.UI.PersistChildrenAttribute" /> is the default instance; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.PersistChildrenAttribute.IsDefaultAttribute%2A> method to determine if the current instance of the <xref:System.Web.UI.PersistChildrenAttribute> class is the same as the default instance.
This code example is part of a larger example provided for the <xref:System.Web.UI.PersistChildrenAttribute> class.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/CS/persistchildren.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/VB/persistchildren.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="F:System.Web.UI.PersistChildrenAttribute.Default" />
</Docs>
</Member>
<Member MemberName="No">
<MemberSignature Language="C#" Value="public static readonly System.Web.UI.PersistChildrenAttribute No;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Web.UI.PersistChildrenAttribute No" />
<MemberSignature Language="DocId" Value="F:System.Web.UI.PersistChildrenAttribute.No" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly No As PersistChildrenAttribute " />
<MemberSignature Language="F#" Value=" staticval mutable No : System.Web.UI.PersistChildrenAttribute" Usage="System.Web.UI.PersistChildrenAttribute.No" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Web::UI::PersistChildrenAttribute ^ No;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.PersistChildrenAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates that nested content should not persist as nested controls at design time. This field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.UI.PersistChildrenAttribute.No> field is called, the inner content of a server control is persisted as properties, not as server.
]]></format>
</remarks>
<altmember cref="F:System.Web.UI.PersistChildrenAttribute.Yes" />
</Docs>
</Member>
<Member MemberName="Persist">
<MemberSignature Language="C#" Value="public bool Persist { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Persist" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.PersistChildrenAttribute.Persist" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Persist As Boolean" />
<MemberSignature Language="F#" Value="member this.Persist : bool" Usage="System.Web.UI.PersistChildrenAttribute.Persist" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool Persist { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the nested content is persisted as nested controls at design time.</summary>
<value>
<see langword="true" /> to persist nested content as nested controls; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to get the value of the <xref:System.Web.UI.PersistChildrenAttribute.Persist%2A> property.
This code example is part of a larger example provided for the <xref:System.Web.UI.PersistChildrenAttribute> class.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/CS/persistchildren.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/VB/persistchildren.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.PersistChildrenAttribute.UsesCustomPersistence" />
<altmember cref="M:System.Web.UI.PersistChildrenAttribute.IsDefaultAttribute" />
</Docs>
</Member>
<Member MemberName="UsesCustomPersistence">
<MemberSignature Language="C#" Value="public bool UsesCustomPersistence { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool UsesCustomPersistence" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.PersistChildrenAttribute.UsesCustomPersistence" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property UsesCustomPersistence As Boolean" />
<MemberSignature Language="F#" Value="member this.UsesCustomPersistence : bool" Usage="System.Web.UI.PersistChildrenAttribute.UsesCustomPersistence" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool UsesCustomPersistence { 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 indicating whether the server control provides custom persistence of nested controls at design time.</summary>
<value>
<see langword="true" /> to provide custom persistence of nested content; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To configure nested content for custom persistence, use the <xref:System.Web.UI.PersistChildrenAttribute> overload that takes a `usesCustomPersistence` parameter.
## Examples
The following code example demonstrates how to get the value of the <xref:System.Web.UI.PersistChildrenAttribute.UsesCustomPersistence%2A> property.
This code example is part of a larger example provided for the <xref:System.Web.UI.PersistChildrenAttribute> class.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/CS/persistchildren.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/PersistChildrenAttribute_Sample/VB/persistchildren.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.PersistChildrenAttribute.#ctor(System.Boolean,System.Boolean)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/zyck4z2c(v=vs.100)">Writing Your Own Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/c73e2402(v=vs.100)">Implementing Custom Persistence</related>
</Docs>
</Member>
<Member MemberName="Yes">
<MemberSignature Language="C#" Value="public static readonly System.Web.UI.PersistChildrenAttribute Yes;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Web.UI.PersistChildrenAttribute Yes" />
<MemberSignature Language="DocId" Value="F:System.Web.UI.PersistChildrenAttribute.Yes" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Yes As PersistChildrenAttribute " />
<MemberSignature Language="F#" Value=" staticval mutable Yes : System.Web.UI.PersistChildrenAttribute" Usage="System.Web.UI.PersistChildrenAttribute.Yes" />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Web::UI::PersistChildrenAttribute ^ Yes;" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.PersistChildrenAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates that nested content should persist as controls at design time. The <see cref="F:System.Web.UI.PersistChildrenAttribute.Yes" /> field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.UI.PersistChildrenAttribute.Yes> field is called, nested content is persisted as controls.
]]></format>
</remarks>
<altmember cref="F:System.Web.UI.PersistChildrenAttribute.No" />
</Docs>
</Member>
</Members>
</Type>