9.9. Connecting PartsA web part that can exchange data with another web part is called connectable . You create a connectable part by implementing one of the SharePoint connection interfaces in your web part class. Since there are two sides to any connection, there are two interfaces for each type of connection: a provider and a consumer. The interfaces are described in Table 9-5. Table 9-5. Web part connection interfaces
9.9.1. Creating a Simple ConnectionThe Web Part Templates for Visual Studio includes templates for ICellProvider and ICellConsumer web parts. To add connectable web parts to an existing web part library project:
The web part templates create connectable parts that share a single value through their Text property. Figure 9-16 shows provider and consumer web parts created from the templates running on a test page. animal 9-16. Changing the Text property of the provider part to see the change in the consumer part |