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 as an administrator (right-click on the shortcut and select Run as administrator).
Select File | New | Project. The new project wizard dialog box will be displayed (make sure to select .NET Framework 3.5 in the top drop-down box).
Select Empty SharePoint...