Thursday, December 01, 2005 9:41 PM Jan Tielens

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.

Filed under:

Comments

# re: Creating Connectable Web Part with the SmartPart

Thursday, December 01, 2005 7:22 PM by David Conder

Very cool, Jan. Thanks for this!

# re: Creating Connectable Web Part with the SmartPart

Friday, December 02, 2005 3:16 AM by Remco Ploeg

Hi Jan,

great example for people starting with the smartpart, go on the good job...

best regards,

Remco

# re: Creating Connectable Web Part with the SmartPart

Friday, December 02, 2005 5:23 AM by Sorin Sandu

Indeed a good job !
regards
Sorin

# re: Creating Connectable Web Part with the SmartPart

Friday, December 02, 2005 2:16 PM by Tim Erickson

Jan,

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

Tim

# re: Creating Connectable Web Part with the SmartPart

Monday, December 05, 2005 3:27 PM by umang

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

# re: Creating Connectable Web Part with the SmartPart

Tuesday, December 06, 2005 7:55 AM by Fares rjoub

When I test NorthwindControls project on
VS 2003 , and deply the user controls to sharepoint , there is an problems , I think it
is the connection to SQL 2000 database ,
because when I test simple textbox control and add it to sharepoint , it works very well ,,

if you have any suggestions , please send to me .

# re: Creating Connectable Web Part with the SmartPart

Thursday, December 08, 2005 12:24 PM by Steve Walker

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 ?

# Security problem

Tuesday, December 27, 2005 6:01 AM by Amr

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

# re: Creating Connectable Web Part with the SmartPart

Thursday, June 15, 2006 1:52 AM by byang

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.

# re: Creating Connectable Web Part with the SmartPart

Friday, July 21, 2006 8:12 AM by Srikanth gupta

Great Demo

# re: Creating Connectable Web Part with the SmartPart

Sunday, August 27, 2006 11:22 PM by Jem Idea

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. :(

# re: Creating Connectable Web Part with the SmartPart

Thursday, September 14, 2006 5:13 PM by Arthur Nguyen

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

Thanks.

# re: Creating Connectable Web Part with the SmartPart

Tuesday, September 26, 2006 10:45 AM by Multiple web parts that gather totals.

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.

# re: Creating Connectable Web Part with the SmartPart

Thursday, October 26, 2006 1:13 PM by Eddie

does smartpart compatable with WSS V3?

# re: Creating Connectable Web Part with the SmartPart

Tuesday, November 07, 2006 2:39 AM by Marko Macek

problems:

1. only strings can be passed

2. only 1 parameter supported

# re: Creating Connectable Web Part with the SmartPart

Monday, January 08, 2007 10:24 AM by Simon Thompson

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

# re: Creating Connectable Web Part with the SmartPart

Sunday, April 01, 2007 11:40 AM by Yonatan

Hi simon,

I've encountared the same problem,

Did you succeed to solve it yet?

Thanks,

Yonatan

# re: Creating Connectable Web Part with the SmartPart

Tuesday, April 10, 2007 8:01 AM by sangram

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...

# re: Creating Connectable Web Part with the SmartPart

Thursday, July 05, 2007 12:59 AM by Mukesh

Can we pass datasets in connectable smartparts

# re: Creating Connectable Web Part with the SmartPart

Wednesday, August 08, 2007 11:04 AM by Lefortludovic

is it possible to make multiple connection

more than one provider for a consumer ?

Thanks