ConnectionConsumerAttribute.ConnectionConsumerAttribute(String) Constructor

Initializes a new instance of the ConnectionConsumerAttribute class, specifying a display name for the consumer connection point.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

public:
ConnectionConsumerAttribute (
	String^ displayName
)
public ConnectionConsumerAttribute (
	String displayName
)
public function ConnectionConsumerAttribute (
	displayName : String
)
Not applicable.

Parameters

displayName

A string that contains a friendly name for the consumer connection point to display in the user interface (UI).

Exception typeCondition

ArgumentNullException

displayName is a null reference (Nothing in Visual Basic).

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 ConnectionsZone control to represent a consumer's connection point in the UI.

The following code example demonstrates using the 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 ConnectionConsumerAttribute class overview.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: