Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Connects two Web Part connection points using a connection transformer.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Function SPConnectWebParts ( _
provider As WebPart, _
providerConnectionPoint As ProviderConnectionPoint, _
consumer As WebPart, _
consumerConnectionPoint As ConsumerConnectionPoint, _
transformer As WebPartTransformer _
) As SPWebPartConnection
'Usage
Dim instance As SPLimitedWebPartManager
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint
Dim transformer As WebPartTransformer
Dim returnValue As SPWebPartConnection
returnValue = instance.SPConnectWebParts(provider, _
providerConnectionPoint, consumer, _
consumerConnectionPoint, transformer)
public SPWebPartConnection SPConnectWebParts(
WebPart provider,
ProviderConnectionPoint providerConnectionPoint,
WebPart consumer,
ConsumerConnectionPoint consumerConnectionPoint,
WebPartTransformer transformer
)
Parameters
provider
Type: System.Web.UI.WebControls.WebParts.WebPartThe provider Web Part.
providerConnectionPoint
Type: System.Web.UI.WebControls.WebParts.ProviderConnectionPointThe provider connection point.
consumer
Type: System.Web.UI.WebControls.WebParts.WebPartThe consumer Web Part.
consumerConnectionPoint
Type: System.Web.UI.WebControls.WebParts.ConsumerConnectionPointThe consumer connection point.
transformer
Type: System.Web.UI.WebControls.WebParts.WebPartTransformerThe Web Part transformer between the connection points.
Return Value
Type: Microsoft.SharePoint.WebPartPages.SPWebPartConnection
The SPWebPartConnection object for the connected connection points.
Exceptions
| Exception | Condition |
|---|---|
| WebPartPageUserException | The provider or consumer Web Part is not on the page. |