3

I have a custom web part which does not allow multiple connection. Scenario : I've added the custom web part on the page, added 2 lists on the same page.

Step 1 : I connect List 1 to web part and implement my functionality

Step 2 : I delete List 1

Step 3 : I get my custom error message that list name is invalid.[As required for the functionality]

Step 4 : I edit web part , and try to connect it to List 2

Step 5 : Error message received

"The connection point "filter parameter" on "g_789a749a_836c_45c4_b247_f4bfa28b94a3" does not allow multiple connections.

Stack Trace

WebPartPageUserException: The connection point "filter parameter" on "g_789a749a_836c_45c4_b247_f4bfa28b94a3" does not allow multiple connections. Microsoft.SharePoint.WebPartPages.SPWebPartManager.CanSPConnectWebPartsCore(WebPart provider, ProviderConnectionPoint providerConnectionPoint, WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint, WebPartTransformer transformer, Boolean throwOnError) +2369 Microsoft.SharePoint.WebPartPages.SPWebPartManager.SPConnectWebParts(WebPart provider, ProviderConnectionPoint providerConnectionPoint, WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint, WebPartTransformer transformer, Boolean bCheck) +96 Microsoft.SharePoint.WebPartPages.Communication.PersistConnection.CreateConnection(String xFormTypeName, String xFormInfo) +630 Microsoft.SharePoint.WebPartPages.Communication.PersistConnection..ctor(ConnectionDesigner designer, SPWebPartManager manager) +1517 Microsoft.SharePoint.WebPartPages.Communication.ConnectionDesigner.PersistChangedConnections() +63 Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateConnectionDesigner() +437 Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateConnections() +361 System.Web.UI.WebControls.WebParts.WebPartManager.OnPageLoadComplete(Object sender, EventArgs e) +70 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnLoadComplete(EventArgs e) +11046222 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3160

I am think of checking weather the web part has any connection or could be connected to the list.

1
  • Could you provide code from your webpart, concerned with connections? Which interface do you implement? Commented Sep 24, 2011 at 11:15

1 Answer 1

0

I fixed it by adding AllowsMultipleConnections:

[ConnectionConsumer("Filter", "UniqueFilterName", AllowsMultipleConnections = true)]
public void GetConnectionInterface(IWebPartParameters pProvider)
{
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.