Export (0) Print
Expand All

WebPart.RegisterInterface method (String, String, Int32, ConnectionRunAt, Object, String, String, String, Boolean)

NOTE: This API is now obsolete.

Registers an interface from the Microsoft.SharePoint.WebPartPages.Communication namespace for a connectable Web Part with the option of specifying how cross-page connections are handled.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[ObsoleteAttribute("Use ConnectionProvider or ConnectionConsumer attribute to create ConnectionPoint instead.")]
protected void RegisterInterface(
	string interfaceName,
	string interfaceTypeName,
	int maxConnections,
	ConnectionRunAt runAtOptions,
	Object interfaceObject,
	string interfaceClientReference,
	string menuLabel,
	string description,
	bool allowCrossPageConnection
)

Parameters

interfaceName
Type: System.String

The friendly name of the interface.

interfaceTypeName
Type: System.String

The type of the interface as listed in the fields of the InterfaceTypes class.

maxConnections
Type: System.Int32

The specified limit on the number of connections to this interface. Can be either LimitOneConnection or UnlimitedConnections.

runAtOptions
Type: Microsoft.SharePoint.WebPartPages.Communication.ConnectionRunAt

A ConnectionRunAtvaluethat specifies where the interface can be run.

interfaceObject
Type: System.Object

A reference to the implemented interface.

interfaceClientReference
Type: System.String

The string used to reference the interface in script for client-side connections, for example RowProviderInterface_WPQ_.

menuLabel
Type: System.String

The label that will be used in the user interface for creating a Web Part connection with this interface.

description
Type: System.String

A brief description of the interface that will be used in the user interface for creating a Web Part connection with this interface.

allowCrossPageConnection
Type: System.Boolean

Specifies whether this connection interface is exposed in the user interface of authoring environments for creating a connection across two Web Part pages. If the value is set to true, this connection interface is exposed in the authoring environment for creating cross-page connections within the limitations of the connection compatibility rules defined by the Web Part infrastructure. If the value is set to false, the interface is not available for authoring cross-page connections.

When developing a connectable Web Part, you should call this method one time for each interface in the EnsureInterfaces method for the Web Part.

NoteNote

This method is one of two overloaded RegisterInterface methods. The other method, RegisterInterface does not include the allowCrossPageConnection parameter in its function signature, and hard codes this setting to default values.

For a code example that calls the RegisterInterface method, see RegisterInterface. For an overview of the steps of creating a connectable Web Part, see Walkthrough: Creating a Connectable SharePoint Web Part.

Show:
© 2014 Microsoft