/
ConnectionConsumerAttribute.xml
445 lines (393 loc) · 38.4 KB
/
ConnectionConsumerAttribute.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
<Type Name="ConnectionConsumerAttribute" FullName="System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute">
<TypeSignature Language="C#" Value="public class ConnectionConsumerAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ConnectionConsumerAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" />
<TypeSignature Language="VB.NET" Value="Public Class ConnectionConsumerAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type ConnectionConsumerAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class ConnectionConsumerAttribute : Attribute" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.Method)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Method)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Identifies the callback method in a server control acting as the consumer in a Web Parts connection, and enables developers to specify details about the consumer's connection point.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A Web Parts connection consists of two server controls residing in a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zone and sharing data by means of an interface instance passed from one control to the other. The control that serves the interface instance is called the provider, and the control that receives the interface instance and processes or displays the data is called the consumer. For details on connections, see the <xref:System.Web.UI.WebControls.WebParts.WebPartConnection> class and [Web Parts Connections Overview](https://docs.microsoft.com/previous-versions/aspnet/ms178187(v=vs.100)).
The consumer control in a connection can be a <xref:System.Web.UI.WebControls.WebParts.WebPart> control or any type of server or user control, but it must have a method designated as a callback method. The callback method is invoked during the connection process, and its purpose is to receive from the provider an interface instance that contains data. To designate the method that serves as the callback method in a consumer, you must add a `ConnectionConsumerAttribute` metadata element to the method (the element is based on the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> class).
In addition to designating the callback method in a consumer, the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> object also enables you to specify certain details about a consumer's connection point. A consumer connection point is an instance of the <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint> class that encapsulates all the details about a consumer needed to establish a connection, including the consumer's control type, whether it can connect to multiple providers at the same time, what type of interface the consumer can receive from a provider, details about the callback method, and a display name that represents the consumer connection point in the user interface (UI). Every Web Parts connection includes a consumer connection point that is associated with the consumer control.
When you add the `ConnectionConsumerAttribute` metadata element to the callback method in a consumer, you can also use it to specify the following details about the consumer connection point: a display name for the connection point (for details, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property), whether the consumer can connect to multiple providers at the same time (for details, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.AllowsMultipleConnections%2A> property), an ID for the connection point (for details, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID%2A> property), and the type of the connection point that the consumer uses (for details, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ConnectionPointType%2A> property). The four overloads of the constructor for the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> class each have parameters that allow you to specify values for one or more of these connection point properties when a new instance of the class is created. Most of the properties for a consumer connection point can also be set programmatically; setting them using the `ConnectionConsumerAttribute` element is optional.
> [!NOTE]
> When you add the `ConnectionConsumerAttribute` metadata element to a callback method in a consumer, the only required parameter that you must always specify is the `displayName` parameter (for details, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.%23ctor%28System.String%29> constructor overload). The value of this parameter is assigned to the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property, and when a user opens the connection UI (created by the <xref:System.Web.UI.WebControls.WebParts.ConnectionsZone> control), the display name represents the consumer connection point in the UI. If you designate multiple callback methods in a consumer control, you will have multiple possible connection points to choose from, and when you add the `ConnectionConsumerAttribute` metadata element to each callback method, you should also specify a value for the `id` parameter, so that each consumer connection point has a known, unique identifier.
## Examples
The following code example demonstrates using the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> class, by showing how to declare the `ConnectionConsumerAttribute` metadata element on a callback method in a consumer control. Note that the simplest overload of the constructor is used; only the `displayName` parameter value is supplied.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/CS/rowconsumerwebpart.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/VB/rowconsumerwebpart.vb" id="Snippet5":::
The following code examples demonstrate how to create a basic, static connection between two Web Parts controls using the <xref:System.Web.UI.WebControls.WebParts.WebPartConnection> class. The provider and consumer code files should be put into the App_Code folder under the application folder that contains the .aspx page.
The first example shows a class acting as a provider.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/CS/rowproviderwebpart.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/VB/rowproviderwebpart.vb" id="Snippet1":::
The second example shows a class acting as a consumer. Notice that a method is designated as the callback method with the `ConnectionConsumerAttribute` metadata element.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/CS/rowconsumerwebpart.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/VB/rowconsumerwebpart.vb" id="Snippet2":::
The final example shows the ASP.NET page that contains the two controls.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/CS/defaultcs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/VB/defaultvb.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartConnection" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.ConnectionPoint" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
<related type="Article" href="https://msdn.microsoft.com/library/8ada6210-ed00-4157-b3e9-a7e87e77caa2">Securing Web Parts Pages</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/ms178187(v=vs.100)">Web Parts Connections Overview</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.WebControls.WebParts.ConnectionConsumerAttribute" /> class, specifying a value to use for the connection point display name, and optionally specifying values to use for the connection point's ID, the connection point type, or both.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A consumer control can have multiple methods marked with the `ConnectionConsumerAttribute` metadata element. In this case, the consumer would have multiple connection points, and each instance of the `ConnectionConsumerAttribute` element should specify a unique ID value for the associated connection point, so that the consumer's connection points can be distinguished.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ConnectionConsumerAttribute (string displayName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string displayName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (displayName As String)" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" Usage="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute displayName" />
<MemberSignature Language="C++ CLI" Value="public:
 ConnectionConsumerAttribute(System::String ^ displayName);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="displayName" Type="System.String" />
</Parameters>
<Docs>
<param name="displayName">A string that contains a friendly name for the consumer connection point to display in the user interface (UI).</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" /> class, specifying a display name for the consumer connection point.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor creates an instance of the attribute that is used with a method of a Web Parts control acting as a consumer. This method becomes the connection point between the provider and the consumer. Typically, the way you use this constructor is to declare a `ConnectionConsumerAttribute` metadata element on a method that you want to designate as a callback method in a consumer control.
The `displayName` parameter is a friendly name of the consumer connection point that is used by the <xref:System.Web.UI.WebControls.WebParts.ConnectionsZone> control to represent a consumer's connection point in the UI.
## Examples
The following code example demonstrates using the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> class, by showing how to declare the `ConnectionConsumerAttribute` metadata element on a callback method in a consumer control. Note that the simplest overload of the constructor is used; only the `displayName` parameter value is supplied. For the full code required to run the code example, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/CS/rowconsumerwebpart.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/VB/rowconsumerwebpart.vb" id="Snippet5":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="displayName" /> is <see langword="null" />.</exception>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ConnectionConsumerAttribute (string displayName, string id);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string displayName, string id) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.#ctor(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (displayName As String, id As String)" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string * string -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" Usage="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute (displayName, id)" />
<MemberSignature Language="C++ CLI" Value="public:
 ConnectionConsumerAttribute(System::String ^ displayName, System::String ^ id);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="displayName" Type="System.String" />
<Parameter Name="id" Type="System.String" />
</Parameters>
<Docs>
<param name="displayName">A string that contains a friendly name for the consumer connection point to display in the user interface (UI).</param>
<param name="id">The <see cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID" />, a unique string value assigned to the consumer connection point.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" /> class, specifying a display name and an ID for the consumer connection point.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `displayName` parameter is a friendly name of the consumer connection point that is used by the <xref:System.Web.UI.WebControls.WebParts.ConnectionsZone> control to represent a consumer's connection point in the UI.
The `id` parameter is used to specify the ID for the consumer connection point associated with the specific callback method. A control can have multiple connection points, but the `id` for each must be unique. Therefore, this overload of the constructor is useful if you have multiple callback methods in your consumer control.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="displayName" /> or <paramref name="id" /> is <see langword="null" />.</exception>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ConnectionConsumerAttribute (string displayName, Type connectionPointType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string displayName, class System.Type connectionPointType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.#ctor(System.String,System.Type)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (displayName As String, connectionPointType As Type)" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string * Type -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" Usage="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute (displayName, connectionPointType)" />
<MemberSignature Language="C++ CLI" Value="public:
 ConnectionConsumerAttribute(System::String ^ displayName, Type ^ connectionPointType);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="displayName" Type="System.String" />
<Parameter Name="connectionPointType" Type="System.Type" />
</Parameters>
<Docs>
<param name="displayName">A string that contains a friendly name for the consumer connection point to display in the user interface (UI).</param>
<param name="connectionPointType">A <see cref="T:System.Type" /> that derives from <see cref="T:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint" />, and that you want to specify as the type of connection point object to use with a specific callback method.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" /> class, specifying a display name and a specific type of connection point object to use for the consumer connection point.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `displayName` parameter is a friendly name of the consumer connection point that is used by the <xref:System.Web.UI.WebControls.WebParts.ConnectionsZone> control to represent a consumer's connection point in the UI.
The `connectionPointType` parameter must be a <xref:System.Type> derived from <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint>. If this parameter is specified, the <xref:System.Type> is used to create the connection point instead of the standard <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint> class provided with the Web Parts control set.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="displayName" /> or <paramref name="connectionPointType" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="connectionPointType" /> is not valid.</exception>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ConnectionPointType" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ConnectionConsumerAttribute (string displayName, string id, Type connectionPointType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string displayName, string id, class System.Type connectionPointType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.#ctor(System.String,System.String,System.Type)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (displayName As String, id As String, connectionPointType As Type)" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string * string * Type -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" Usage="new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute (displayName, id, connectionPointType)" />
<MemberSignature Language="C++ CLI" Value="public:
 ConnectionConsumerAttribute(System::String ^ displayName, System::String ^ id, Type ^ connectionPointType);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="displayName" Type="System.String" />
<Parameter Name="id" Type="System.String" />
<Parameter Name="connectionPointType" Type="System.Type" />
</Parameters>
<Docs>
<param name="displayName">A string that contains a friendly name for the consumer connection point to display in the user interface (UI).</param>
<param name="id">The <see cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID" />, a unique string value assigned to the consumer connection point.</param>
<param name="connectionPointType">A <see cref="T:System.Type" /> that derives from <see cref="T:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint" />, and that you want to specify as the type of connection point object to use with a specific callback method.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute" /> class, specifying a display name, an ID, and a specific type of connection point object to use for the consumer connection point.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `displayName` parameter is a friendly name of the consumer connection point that is used by the <xref:System.Web.UI.WebControls.WebParts.ConnectionsZone> control to represent a consumer's connection point in the UI.
The `id` parameter is used to specify the ID for the consumer connection point associated with the specific callback method. A control can have multiple connection points, but the `id` for each must be unique. Therefore, this overload of the constructor is useful if you have multiple callback methods in your consumer control.
The `connectionPointType` parameter must be a <xref:System.Type> derived from <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint>. If this parameter is specified, the <xref:System.Type> is used to create the connection point instead of the standard <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint> class provided with the Web Parts control set.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="displayName" />, <paramref name="id" />, or <paramref name="connectionPointType" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="connectionPointType" /> is not valid.</exception>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ConnectionPointType" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID" />
</Docs>
</Member>
<Member MemberName="AllowsMultipleConnections">
<MemberSignature Language="C#" Value="public bool AllowsMultipleConnections { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowsMultipleConnections" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.AllowsMultipleConnections" />
<MemberSignature Language="VB.NET" Value="Public Property AllowsMultipleConnections As Boolean" />
<MemberSignature Language="F#" Value="member this.AllowsMultipleConnections : bool with get, set" Usage="System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.AllowsMultipleConnections" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool AllowsMultipleConnections { bool get(); void set(bool value); };" />
<MemberType>Property</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#">[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>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: 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 or sets a value that indicates whether the connection point allows multiple connections.</summary>
<value>
<see langword="true" /> if the connection point accepts multiple connections; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, consumer connections do not accept multiple connections, so this property is set to `false`. Provider connections, however, do accept multiple connections by default, and this property on a <xref:System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute> object is set to `true`.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionPoint.AllowsMultipleConnections" />
</Docs>
</Member>
<Member MemberName="ConnectionPointType">
<MemberSignature Language="C#" Value="public Type ConnectionPointType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type ConnectionPointType" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ConnectionPointType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ConnectionPointType As Type" />
<MemberSignature Language="F#" Value="member this.ConnectionPointType : Type" Usage="System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ConnectionPointType" />
<MemberSignature Language="C++ CLI" Value="public:
 property Type ^ ConnectionPointType { Type ^ 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.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the connection point type of the consumer connection point.</summary>
<value>A <see cref="T:System.Type" /> that indicates the type of the connection point.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property returns the <xref:System.Type> of the consumer connection point. The <xref:System.Type> must derive from <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint>, and when you declare the `connectionPointType` parameter with a `ConnectionConsumerAttribute` metadata element on a callback method, an instance of the type you declare is used to create a connection point instead of the standard <xref:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint> class.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">An invalid connection point type (one that does not derive from the <see cref="T:System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint" /> class) was used.</exception>
</Docs>
</Member>
<Member MemberName="DisplayName">
<MemberSignature Language="C#" Value="public virtual string DisplayName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DisplayName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property DisplayName As String" />
<MemberSignature Language="F#" Value="member this.DisplayName : string" Usage="System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ DisplayName { System::String ^ get(); };" />
<MemberType>Property</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#">[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.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the friendly name of the consumer connection point.</summary>
<value>A string containing a friendly display name for the consumer connection point.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is the friendly name of a consumer connection point. Its value can be set declaratively, when you add the `displayName` parameter to a `ConnectionConsumerAttribute` metadata element on a callback method. It can also be set programmatically by a derived class, by using the protected <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayNameValue%2A> property.
When you are searching through a connection point collection, you should use the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID%2A> property, because the ID property must be unique, but the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property need not be.
The <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property of a consumer connection point is displayed to users when a <xref:System.Web.UI.WebControls.WebParts.ConnectionsZone> control is on the page, the connection user interface (UI) is open, and the users are in a view where they are allowed to select connection points to establish a connection.
## Examples
The following code example demonstrates using the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property, by showing how to declare the `ConnectionConsumerAttribute` metadata element on a callback method in a consumer control. Note that the simplest overload of the constructor is used; only the `displayName` parameter value is supplied. The value of the parameter will become the value of the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property. For the full code required to run the code example, see the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/CS/rowconsumerwebpart.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/UI.WebControls.WebParts.Connection/VB/rowconsumerwebpart.vb" id="Snippet5":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionPoint.DisplayName" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayNameValue" />
</Docs>
</Member>
<Member MemberName="DisplayNameValue">
<MemberSignature Language="C#" Value="protected string DisplayNameValue { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DisplayNameValue" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayNameValue" />
<MemberSignature Language="VB.NET" Value="Protected Property DisplayNameValue As String" />
<MemberSignature Language="F#" Value="member this.DisplayNameValue : string with get, set" Usage="System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayNameValue" />
<MemberSignature Language="C++ CLI" Value="protected:
 property System::String ^ DisplayNameValue { 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 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>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the string used as the value of the <see cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" /> property, for use in localization scenarios.</summary>
<value>A string that is used as the value of <see cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This extra property exists so that you can derive from <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> and provide a localized version. The derived localizable <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute> attribute will maintain a private Boolean field to indicate whether it has been localized. On the first access to the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property, it will look up the localized string, and then use the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayNameValue%2A> property to assign the localized value to the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName" />
</Docs>
</Member>
<Member MemberName="ID">
<MemberSignature Language="C#" Value="public string ID { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ID" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ID As String" />
<MemberSignature Language="F#" Value="member this.ID : string" Usage="System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ID { System::String ^ 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.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a string that represents the unique identity of the consumer connection point.</summary>
<value>The unique ID assigned to the consumer connection point. The default value is <see cref="F:System.String.Empty" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If searching through a connection point collection, you should use the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID%2A> property to locate a particular connection point. This property can be used to distinguish between two connection points of the same name. Consumer connection points can have the same <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.DisplayName%2A> property value, but the <xref:System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute.ID%2A> property must be different.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>