Creating connectable web parts
The connectable web parts or master-detail web parts are two different web parts that are connected to each other in a provider/consumer fashion. In this recipe, we will create two web parts where one is a provider and the other a consumer.
For this recipe, we will create a DepartmentList
web part that acts as a provider and a DepartmentEmployees
web part that acts as a consumer. Based on the row selected in the DepartmentList
web part, we will list all the employees of the department in the DepartmentEmployees
web part.
Getting ready
You should complete the previous recipes successfully so you understand the concept of web parts and its deployment to follow this one.
How to do it...
- Launch your Visual Studio 2010 IDE ...
Get Microsoft SharePoint 2010 Development with Visual Studio 2010: Expert Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.