Connected WebParts in SharePoint 2010

November 30, 2011 at 11:07 am Leave a comment

SharePoint has very cool features of connected Web Parts, It simply means that two different web parts are connected and they can share data between them.

In Connected Web Parts there are basically two things required at least, one is Consumer Web Parts and Provider Web Parts. Consumer Web Parts gets data from Provider Web Parts, and this data passing is usually done with use of interface.

Connected web parts are best when we have two different web parts and we want to change web parts activity based on external events happen in another web part exist in the same web page.

Here, MSDN contains very nice walk through for creating connected web parts.

In above article, two attributes plays role for connecting web parts

ConnectionProvider:

It should be attached to any one method which returns data, it does not necessary that it must have some value specified in the bracket, what so ever you write there will be displayed when you access web parts from SharePoint site.

ConnectionConsumer

It should be attached to any one method which gets data from another web part.

NOTE: when you use this connected web parts in Web Part page added in sharepoint, you will have option to connect with consumer web parts. But in case of default page you may require to turn to edit mode of your page and then click on edit of web part and then you will have this options of connecting to another consumer web part.

In above scenario it is assumed that firstly we have added both consumer and provider web parts in the page and then we will have option to connect web parts.

Advertisement

Entry filed under: Sharepoint. Tags: .

Thoughts on Web Parts in SharePoint 2010 How to Resolve Activate disabled Sandbox solution in SharePoint 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Archives

Categories

 

November 2011
M T W T F S S
« Aug   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Blog Stats

  • 1,647

Follow

Get every new post delivered to your Inbox.