Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom web part which does not allow multiple connection. Scenario : i add the custom web part on the page , add 2 list on the same page .

Step 1 : I connect List 1 to web part and implement my functionality. Step 2 : I delete List1. 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.]<br/> Microsoft.SharePoint.WebPartPages.SPWebPartManager.CanSPConnectWebPartsCore(WebPart provider, ProviderConnectionPoint providerConnectionPoint, WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint, WebPartTransformer transformer, Boolean throwOnError) +2369<br/> Microsoft.SharePoint.WebPartPages.SPWebPartManager.SPConnectWebParts(WebPart provider, ProviderConnectionPoint providerConnectionPoint, WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint, WebPartTransformer transformer, Boolean bCheck) +96<br/> Microsoft.SharePoint.WebPartPages.Communication.PersistConnection.CreateConnection(String xFormTypeName, String xFormInfo) +630<br/> Microsoft.SharePoint.WebPartPages.Communication.PersistConnection..ctor(ConnectionDesigner designer, SPWebPartManager manager) +1517<br/> Microsoft.SharePoint.WebPartPages.Communication.ConnectionDesigner.PersistChangedConnections() +63<br/> Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateConnectionDesigner() +437<br/> Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateConnections() +361<br/> System.Web.UI.WebControls.WebParts.WebPartManager.OnPageLoadComplete(Object sender, EventArgs e) +70<br/> System.EventHandler.Invoke(Object sender, EventArgs e) +0<br/> System.Web.UI.Page.OnLoadComplete(EventArgs e) +11046222<br/> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3160<br/>



i am think of checking weather the web part has any connection or could be connected to the list.
Can anyone help me in implementing this.

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
add comment

1 Answer 1

I fixed it by adding AllowsMultipleConnections:

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

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.