SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
Could you provide code from your webpart, concerned with connections? Which interface do you implement? – Andrey Markeev Sep 24 '11 at 11:15

I fixed it by adding AllowsMultipleConnections:

[ConnectionConsumer("Filter", "UniqueFilterName", AllowsMultipleConnections = true)]
public void GetConnectionInterface(IWebPartParameters pProvider)
{
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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