WebPartManager.CanConnectWebParts Method (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer)
Checks the WebPart controls that will be participating in a connection to determine whether they are capable of being connected, and uses a WebPartTransformer object to create the connection between an incompatible consumer and provider.
Assembly: System.Web (in System.Web.dll)
public virtual bool CanConnectWebParts( WebPart provider, ProviderConnectionPoint providerConnectionPoint, WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint, WebPartTransformer transformer )
The control that provides data to consumer when the controls are connected.
A ConnectionPoint that acts as a callback method so that provider can participate in a connection.
The control that receives data from provider when the controls are connected.
A ConnectionPoint that acts as a callback method so that consumer can participate in a connection.
A WebPartTransformer that enables an incompatible provider and consumer to connect.
Return ValueType: System.Boolean
A Boolean value that indicates whether provider and consumer can form a connection.
This method is used to connect provider and consumer when both controls have incompatible connection point types, so that a WebPartTransformer object is required. You might want to use this method to verify that two controls can be connected before calling ConnectWebParts to create a programmatic connection.
This overload uses the same implementation as the CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint) method overload, with the only exception being that this overload requires a transformer.
Available since 2.0