/
EmptyControlCollection.xml
177 lines (164 loc) · 10 KB
/
EmptyControlCollection.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
<Type Name="EmptyControlCollection" FullName="System.Web.UI.EmptyControlCollection">
<TypeSignature Language="C#" Value="public class EmptyControlCollection : System.Web.UI.ControlCollection" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EmptyControlCollection extends System.Web.UI.ControlCollection" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.EmptyControlCollection" />
<TypeSignature Language="VB.NET" Value="Public Class EmptyControlCollection
Inherits ControlCollection" />
<TypeSignature Language="F#" Value="type EmptyControlCollection = class
 inherit ControlCollection" />
<TypeSignature Language="C++ CLI" Value="public ref class EmptyControlCollection : System::Web::UI::ControlCollection" />
<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.Web.UI.ControlCollection</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides standard support for a <see cref="T:System.Web.UI.ControlCollection" /> collection that is always empty.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This class is used when you want to define a custom control that does not allow child controls.
## Examples
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_EmptyControlCollection/CS/emptycontrolcollection.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_EmptyControlCollection/VB/emptycontrolcollection.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EmptyControlCollection (System.Web.UI.Control owner);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.Control owner) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.EmptyControlCollection.#ctor(System.Web.UI.Control)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (owner As Control)" />
<MemberSignature Language="F#" Value="new System.Web.UI.EmptyControlCollection : System.Web.UI.Control -> System.Web.UI.EmptyControlCollection" Usage="new System.Web.UI.EmptyControlCollection owner" />
<MemberSignature Language="C++ CLI" Value="public:
 EmptyControlCollection(System::Web::UI::Control ^ owner);" />
<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="owner" Type="System.Web.UI.Control" />
</Parameters>
<Docs>
<param name="owner">The <see cref="T:System.Web.UI.Control" /> that owns this collection as its collection of child controls.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.EmptyControlCollection" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example attempts to populate a control with child controls, causing an exception. This is because the container control does not allow child controls. The following is the command line used to build the executable.
```vb
vbc /r:System.dll /r:System.Web.dll /t:library
/out:myWebAppPath/bin/vb_myEmptyControlCollection.dll
myEmptyControlCollection.vb
```
```csharp
csc /t:library /out:myWebAppPath/bin/cs_myEmptyControlCollection.dll
myEmptyControlCollection.cs
```
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/SystemWebUI_EmptyControlCollection/CS/emptycontrolcollection.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUI_EmptyControlCollection/VB/emptycontrolcollection.vb" id="Snippet1":::
The following code example uses the empty custom control defined above. When running this example, you will get an exception. Notice that the values shown in the `Register` directive reflect the previous command line.
```vb
<%@ Register TagPrefix="custom" Assembly="vb_myEmptyControlCollection" Namespace="CustomControls" %>
<html>
<body>
<h1>Using an Empty Control</h1>
<custom:MyVB_EmptyControl id="vbEmptyControlId" runat="server"/>
</body>
</html>
```
```csharp
<%@ Register TagPrefix="custom" Assembly="cs_myEmptyControlCollection" Namespace="CustomControls" %>
<html>
<body>
<h1>Using an Empty Control </h1>
<custom:MyCS_EmptyControl id="csEmptyControlId" runat="server"/>
</body>
</html>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public override void Add (System.Web.UI.Control child);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Add(class System.Web.UI.Control child) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.EmptyControlCollection.Add(System.Web.UI.Control)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub Add (child As Control)" />
<MemberSignature Language="F#" Value="override this.Add : System.Web.UI.Control -> unit" Usage="emptyControlCollection.Add child" />
<MemberSignature Language="C++ CLI" Value="public:
 override void Add(System::Web::UI::Control ^ child);" />
<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>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="child" Type="System.Web.UI.Control" />
</Parameters>
<Docs>
<param name="child">The <see cref="T:System.Web.UI.Control" /> to be added. This parameter is always ignored.</param>
<summary>Denies the addition of the specified <see cref="T:System.Web.UI.Control" /> object to the collection.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.Web.HttpException">Always issued, because the control does not allow child controls.</exception>
</Docs>
</Member>
<Member MemberName="AddAt">
<MemberSignature Language="C#" Value="public override void AddAt (int index, System.Web.UI.Control child);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void AddAt(int32 index, class System.Web.UI.Control child) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.EmptyControlCollection.AddAt(System.Int32,System.Web.UI.Control)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub AddAt (index As Integer, child As Control)" />
<MemberSignature Language="F#" Value="override this.AddAt : int * System.Web.UI.Control -> unit" Usage="emptyControlCollection.AddAt (index, child)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void AddAt(int index, System::Web::UI::Control ^ child);" />
<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>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="child" Type="System.Web.UI.Control" />
</Parameters>
<Docs>
<param name="index">The index at which to add the <see cref="T:System.Web.UI.Control" />. This parameter is always ignored.</param>
<param name="child">The <see cref="T:System.Web.UI.Control" /> to be added. This parameter is always ignored.</param>
<summary>Denies the addition of the specified <see cref="T:System.Web.UI.Control" /> object to the collection, at the specified index position.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.Web.HttpException">Always issued, because the control does not allow child controls.</exception>
</Docs>
</Member>
</Members>
</Type>