SharePoint 2010 - Sharing data between Visual Web Parts - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Monday, May 21, 2012

SharePoint 2010 - Sharing data between Visual Web Parts

Sometimes developers might need to shared data between web parts. In this article I am going to demonstrate how you can share data between two Visual web parts.

For the purpose of article, I am going to create two web parts one will ask user to select the gender and the other web part will display the selected gender. This scenario looks so simple, but for the purpose of demonstrating how to share data between Visual web parts, I believe the scenario is ok.

For the purpose of this Article, I am going to create two Visual web parts as follows.

GenderProvider web part – This web part will allow users to select the gender using a radiobuttonlist. This web part will provide gender data to other web parts.
GenderConsumerWebpart – This web part will display what the user has selected in the first web part.

The following are the steps for building such an application.
  • Create an Empty SharePoint 2010 project
  • Create an Interface that represents the data to be shared
  • Create a provider web part that implement the Interface
  • Create a consumer web part that consumes the string
  • Include these web parts in a page and define the connections

Read More....


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.

No comments:

Post a Comment