Articles disappeared in the snafu that occured on sharepointblogs.com recently. So this is just the text of the article I wrote on Son of Smart Part.
ASP.NET 2.0 User Controls in WSS
I thought I would try out the excellent Son of Smartpart by Jan Tielens. http://weblogs.asp.net/jan/
This is a good all over project:
1) I get to upgrade a WSS server to .NET 2.0
2) I get to try out Son of Smartpart (I used Smartpart previously)
3) I get to try out some of the new ASP.NET 2.0 functionality (yay!)
As a project I thought I would re-develop the "display as HTML table all sites from a server". My current implementation is great from an "easy to do as a non-coder" point of view but isn't great from a "yes but it reads the WSS Db directly".
Step 1) Download Son of Smartpart. Home page for Smartpart is http://www.smartpart.info/
Step 2) Take a backup of the VM I plan to do this work on ;)
Step 3) Upgrade to .NET 2.0 runtime. http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en
Step 4) Make a cup of tea...
Step 5) Go and install WSS SP2 (Oops! - too many VMs!)
Step 6) Follow SonOfSmartpart installation instructions.
Step 7) Add the supplied test user control (SmartPartTest.ascx) to the userControls directory.
Step 8) Add a SmartPart UC webpart, then add the user control via the tool pane. You should now see a Calendar control. Yay!
Step 9) Re-install IIS since it seems to have broken since VS2005 was installed. Didn't figure out the issue, went brute force.
Step 10) Create a new web project
Step 11) Add a new user control
Step 12) Add a reference to Sharepoint and SonOfSmartPart assemblies.
Step 13) Inherit from and implement SonOfSmartPart.IAdvancedUserControl
Step 14) Add a DataGrid, I want a URL field, Title, Description and Request Access Email Column
Step 15) Turn off auto generate columns
Step 16) Add a hyperlink column, two bound columns and a template column (with a hyperlink control for the mailto).
Step 17) On the page load create a table, load the data using the SPGlobalAdmin object (we want all sites available from that server), bind to the data grid and we're done!
Step 18) Copy control ascx and .cs files to UserControls directory, set binding in tool pane to be my control and job done.