Skip to Main Content
Essential SharePoint
book

Essential SharePoint

by Jeff Webb
May 2005
Beginner content levelBeginner
336 pages
10h 14m
English
O'Reilly Media, Inc.
Content preview from Essential SharePoint

Connecting Parts

A 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

Interface pair

Use to share

Example

ICellProvider,

ICellConsumer

Single item

Form web part (cell provider), Image web part (cell consumer)

IRowProvider,

IRowConsumer

Row of values

List web part (row provider)

IListProvider,

IListConsumer

List (table) of values

List web part (list provider)

IFilterProvider,

IFilterConsumer

A list filter

Form web part (filter provider)

IParametersInProvider,

IParametersInConsumer

Set of values as described by the web part

None

IParametersOutProvider,

IParametersOutConsumer

Set of values as described by the web part

None

Creating a Simple Connection

The 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:

  1. In Visual Studio, choose Project Add New Item and select the Provider Web Part template.

  2. Create a .dwp file for the web part.

  3. Repeat for the the Consumer Web Part template.

  4. Build the project.

  5. Create a test web page and import the two web parts onto the page.

  6. Choose Modify Shared Page Design ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SharePoint User's Guide

SharePoint User's Guide

Infusion Development Corp. (Infusion Development Corporation)
Beginning SharePoint® 2010: Building Business Solutions with SharePoint

Beginning SharePoint® 2010: Building Business Solutions with SharePoint

Amanda Perran, Shane Perran, Jennifer Mason, Laura Rogers

Publisher Resources

ISBN: 0596008805Errata Page