Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Cannot see webpart connections in code

  Asked By: Parvesh    Date: May 05    Category: Sharepoint    Views: 991

I have a web page with 2 webpart connections:
1. Two list webparts that I connected using Edit Page in SharePoint
2. A data view (consumer) that I created with SP Designer, connected
to a list web part (provider).

Now, I want to find all the connections in this code:

SPFile file = web.GetFile("http://sites/sp/default.aspx");
SPLimitedWebPartManager wpMgr =
SPWebPartConnectionCollection connections =

Surprisingly, wpMgr.SPWebPartConnections is always empty !!!

Then I tried to loop through all the webparts and check their
ConnectionID and Conections members.
These members were valid only for the consumer of the 1st connections.
The 2nd connection (dataview/list) did not appear in any webpart!

So how can I find such connections (involving dataviews) in code?

(Note: I tried to create the 2nd connection either from Designer or
from Edit Page, but the results are the same).



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Cannot see webpart connections in code Or get search suggestion and latest updates.