Creating Connectable Web Part with the SmartPart

Lately I got quite some questions about how you can create connectable web parts with the SmartPart for SharePoint. Because I’m a little bit lazy I’ve recorded a screencast that’s going to show you the basics for creating connectable web user controls that can by hosted in the SmartPart for SharePoint. I’m using SmartPart version 1.1 and ASP.NET 1.1/Visual Studio.NET 2003/SharePoint 2003. If there are some people who want to do the same using the Son of SmartPart and ASP.NET 2.0/Visual Studio 2005/SharePoint 2003, it’s almost exactly the same (same interfaces etc.). In the screencast I’m showing two web parts that retrieve data from the Northwind database: a list of employees and a list of orders. When an employee is selected, the corresponding orders are displayed in the order list. After that I’m showing a test provider and consumer, built from scratch.

17 Comments

  • Very cool, Jan. Thanks for this!

  • Indeed a good job !

    regards

    Sorin

  • Jan,



    This is awesome! Everything is much clearer now - definitely a push in the right direction. Thanks for the post!



    Tim

  • One of the most usefull webpart i have ever used. and now i get everything clear

  • Great Demo. I think this capability is AWESOME and you did a very good job of demoing it in a way that most folks can understand !!!



    Keep up the good work.



    PS - I Applied to become a member of the "SmartPart" workspace on GotDotnet and have never heard back from anyone. Are you still accepting contributors ?

  • hello,

    great work man,

    i'm developing a test webpart which lists all active directory users in a domain but when i upload this webpart in sharepoint it gives an error , i think it is aproblem with security , please reply

    thank you

  • i am also having problem adding user to active directory using smartpart. i have this user control which adds user to active directory( i tested that usercontrol before i put it in the smartpart and its works). but when i put that usercontrol to smart part i kept getting an error.

  • Hi Jan. SmartPart seems like a very useful webpart especially for programmers like me who are just starting on Sharepoint.

    I tried to use the Sharepoint.dll inside the web user control i created but it's causing an error on my Sharepoint site. I have a feeling this is due to some circular reference. Am I right? If so, is there a way to use Sharepoint.dll inside a web user control that will be placed onto SmartPart?

    Sorry for the newbee question. :(

  • Is there a way to pass more than 1 parameters from the producer to the consumer?

    Thanks.

  • Multiple web parts that gather totals from each department and add them up and display them on to one web part on the main page. Please help.

  • does smartpart compatable with WSS V3?

  • problems:

    1. only strings can be passed
    2. only 1 parameter supported

  • I have tried this six or seven times now and all seems to work fine until I try connect the webparts, the connection option on the webpart is greyed out.

    I am using MOSS 2007 and VS 2005 and "son of smart part"

    P.S I think your blog is great!

    Thanks
    Simon

  • Hi simon,
    I've encountared the same problem,
    Did you succeed to solve it yet?

    Thanks,
    Yonatan

  • hi all
    this is really a great demo...but wen i am deploying the two connectable webparts error page is coming into picture showing the webpart seems to be causing some error..plz help me out...

  • Can we pass datasets in connectable smartparts

  • is it possible to make multiple connection

    more than one provider for a consumer ?

    Thanks

Comments have been disabled for this content.