Share via


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)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Use ConnectionProvider or ConnectionConsumer attribute to create ConnectionPoint instead.")> _
Protected Sub RegisterInterface ( _
    interfaceName As String, _
    interfaceTypeName As String, _
    maxConnections As Integer, _
    runAtOptions As ConnectionRunAt, _
    interfaceObject As Object, _
    interfaceClientReference As String, _
    menuLabel As String, _
    description As String, _
    allowCrossPageConnection As Boolean _
)
'Usage
Dim interfaceName As String
Dim interfaceTypeName As String
Dim maxConnections As Integer
Dim runAtOptions As ConnectionRunAt
Dim interfaceObject As Object
Dim interfaceClientReference As String
Dim menuLabel As String
Dim description As String
Dim allowCrossPageConnection As Boolean

Me.RegisterInterface(interfaceName, _
    interfaceTypeName, maxConnections, _
    runAtOptions, interfaceObject, interfaceClientReference, _
    menuLabel, description, allowCrossPageConnection)
[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.

  • 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.

Remarks

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

Note

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.

Examples

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 Connectable Web Parts in SharePoint Foundation.

See Also

Reference

WebPart Class

WebPart Members

RegisterInterface Overload

Microsoft.SharePoint.WebPartPages Namespace