Search code examples
.netsharepointweb-parts

How to link different WebParts pages in SharePoint


I am using some custom WebParts in SharePoint like (http://www.codeplex.com/smartpart) with some controls. I have more than one WebPart at different pages. How is it possible to link them together? For example at the button click event handler or the hyper link target what should be URL to navigate to?


Solution

  • Connecting web parts in SharePoint is usually done by transferring data between them. For example, clicking an item in one web part could provide further details in another. Here is an example on the Office web site. The web parts are configured by connecting them together using controls on the web part title bar.

    There are many examples for developing your own. Here is one I've found that's quite detailed and there are many others if you search for consumer producer connected web part.

    Edit: It is not possible to access the controls in another connected web part (thanks kusek). The solution is to analyze the data coming from the other web part and change behaviour accordingly.