ConnectionPoint.DisplayName Property

Definition

Gets a string that serves as a friendly display name to represent a connection point in the user interface (UI).

public:
 property System::String ^ DisplayName { System::String ^ get(); };
public string DisplayName { get; }
member this.DisplayName : string
Public ReadOnly Property DisplayName As String

Property Value

A string that contains a friendly display name for a ConnectionPoint object.

Remarks

To create a Web Parts connection, the provider and consumer controls for the connection must each specify at least one connection point, a method that enables them to communicate and share data. To identify these connection point methods, a developer specifies an attribute on the selected methods. In the provider, a ConnectionProvider attribute is set on the selected callback method, and in the consumer, a ConnectionConsumer attribute is set on the method that receives an instance of an interface that contains data from the provider. For both of these attributes, the one parameter that is always required, regardless of which overload is declared to create the attribute, is the displayName parameter. The developer must assign a string to be used as a friendly display name for the connection point, and that string becomes the value of the DisplayName property.

The DisplayName property value is displayed in the UI of a Web page when users create connections. For example, when the ConnectionsZone control is added to the page, it creates a UI for users to create connections between controls. After a user switches a page into connect display mode and clicks a connect verb on a WebPart control, the connection UI appears. Each control that can participate in a connection is listed in the UI, and next to each control is a drop-down list control that displays the friendly names of its available connection points. Users must select at least one connection point to establish a connection. The values that appear in the list of connection points are obtained from the DisplayName property. If developers build a custom UI for creating connections, they can use the DisplayName property in a similar way to provide a friendly name that represents a connection point.

Applies to

See also