ConnectionProviderAttribute ConnectionProviderAttribute ConnectionProviderAttribute ConnectionProviderAttribute Constructors

Definition

Overloads

ConnectionProviderAttribute(String) ConnectionProviderAttribute(String) ConnectionProviderAttribute(String) ConnectionProviderAttribute(String)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name for the provider connection point.

ConnectionProviderAttribute(String, String) ConnectionProviderAttribute(String, String) ConnectionProviderAttribute(String, String) ConnectionProviderAttribute(String, String)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name and an ID for the provider connection point.

ConnectionProviderAttribute(String, Type) ConnectionProviderAttribute(String, Type) ConnectionProviderAttribute(String, Type) ConnectionProviderAttribute(String, Type)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name and a specific type of connection point object to use for the provider connection point.

ConnectionProviderAttribute(String, String, Type) ConnectionProviderAttribute(String, String, Type) ConnectionProviderAttribute(String, String, Type) ConnectionProviderAttribute(String, String, Type)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name, an ID, and a specific type of connection point object to use for the provider connection point.

Remarks

A provider control can have multiple methods marked with the ConnectionProviderAttribute metadata element. In this case, the provider would have multiple connection points, and each instance of the ConnectionProviderAttribute element should specify a unique ID value for the associated connection point, so that the provider's connection points can be distinguished.

ConnectionProviderAttribute(String) ConnectionProviderAttribute(String) ConnectionProviderAttribute(String) ConnectionProviderAttribute(String)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name for the provider connection point.

public:
 ConnectionProviderAttribute(System::String ^ displayName);
public ConnectionProviderAttribute (string displayName);
new System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute : string -> System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute
Public Sub New (displayName As String)

Parameters

displayName
String String String String

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

Exceptions

Examples

The following code example demonstrates using the ConnectionProviderAttribute class, by showing how to declare the ConnectionProviderAttribute metadata element on a callback method in a provider 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 ConnectionProviderAttribute class overview.

      [ConnectionProvider("Row")]
      public IWebPartRow GetConnectionInterface()
{
          return new RowProviderWebPart();
      }
<ConnectionProvider("Row")> _
Public Function GetConnectionInterface() As IWebPartRow
    Return New RowProviderWebPart()

End Function 'GetConnectionInterface

Remarks

This constructor creates an instance of the attribute that is used with a method of a Web Parts control acting as a provider. This method becomes the connection point between the provider and the consumer. Typically, the way you use this constructor is to declare a ConnectionProviderAttribute metadata element on a method that you want to designate as a callback method in a provider control.

The displayName parameter is a friendly name of the provider connection point that is used by the ConnectionsZone control to represent a provider's connection point in the UI.

See also

ConnectionProviderAttribute(String, String) ConnectionProviderAttribute(String, String) ConnectionProviderAttribute(String, String) ConnectionProviderAttribute(String, String)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name and an ID for the provider connection point.

public:
 ConnectionProviderAttribute(System::String ^ displayName, System::String ^ id);
public ConnectionProviderAttribute (string displayName, string id);
new System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute : string * string -> System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute
Public Sub New (displayName As String, id As String)

Parameters

displayName
String String String String

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

id
String String String String

The ID, a unique string value assigned to the provider connection point.

Exceptions

Remarks

The displayName parameter is a friendly name of the provider connection point that is used by the ConnectionsZone control to represent a provider's connection point in the UI.

The id parameter is used to specify the ID for the provider 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 provider control.

See also

ConnectionProviderAttribute(String, Type) ConnectionProviderAttribute(String, Type) ConnectionProviderAttribute(String, Type) ConnectionProviderAttribute(String, Type)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name and a specific type of connection point object to use for the provider connection point.

public:
 ConnectionProviderAttribute(System::String ^ displayName, Type ^ connectionPointType);
public ConnectionProviderAttribute (string displayName, Type connectionPointType);
new System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute : string * Type -> System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute
Public Sub New (displayName As String, connectionPointType As Type)

Parameters

displayName
String String String String

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

connectionPointType
Type Type Type Type

A Type that derives from ConnectionPoint, and that you want to specify as the type of connection point object to use with a specific callback method.

Exceptions

Remarks

The displayName parameter is a friendly name of the provider connection point that is used by the ConnectionsZone control to represent a provider's connection point in the UI.

The connectionPointType parameter must be a Type derived from ProviderConnectionPoint. If this parameter is specified, the Type is used to create the connection point instead of the standard ProviderConnectionPoint class provided with the Web Parts control set.

See also

ConnectionProviderAttribute(String, String, Type) ConnectionProviderAttribute(String, String, Type) ConnectionProviderAttribute(String, String, Type) ConnectionProviderAttribute(String, String, Type)

Initializes a new instance of the ConnectionProviderAttribute class, specifying a display name, an ID, and a specific type of connection point object to use for the provider connection point.

public:
 ConnectionProviderAttribute(System::String ^ displayName, System::String ^ id, Type ^ connectionPointType);
public ConnectionProviderAttribute (string displayName, string id, Type connectionPointType);
new System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute : string * string * Type -> System.Web.UI.WebControls.WebParts.ConnectionProviderAttribute
Public Sub New (displayName As String, id As String, connectionPointType As Type)

Parameters

displayName
String String String String

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

id
String String String String

The ID, a unique string value assigned to the provider connection point.

connectionPointType
Type Type Type Type

A Type that derives from ProviderConnectionPoint, and that you want to specify as the type of connection point object to use with a specific callback method.

Exceptions

Remarks

The displayName parameter is a friendly name of the provider connection point that is used by the ConnectionsZone control to represent a provider's connection point in the UI.

The id parameter is used to specify the ID for the provider 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 provider control.

The connectionPointType parameter must be a Type derived from ProviderConnectionPoint. If this parameter is specified, the Type is used to create the connection point instead of the standard ProviderConnectionPoint class provided with the Web Parts control set.

See also

Applies to