Friday, December 22, 2006

OutSmart the SmartPart

My 5 cents on how-to-use SmartPart in Microsoft Office SharePoint 2007

1. After installation of SmartPart and creation of the 'UserControls'-folder in your SharePoint-site, you can deploy
a. Self-contained .ascx-file's (read markup + code) in the UserControls-folder.
b. Codebehind-modeled usercontrols (read separate .ascx + .cs); drop both files in this folder.
c. Updatable+compiled-modeled usercontrols (read: .ascx with markup + compiled .dll); put the .ascx-file in the UserControls-folder and the .dll-file in the 'bin'-folder of your site.

2. Place a System.ComponentModel.DescriptionAttribute on you class with a 'user-friendly' description.

3. Custom properties for your UserControl(-derived) class have to be attributed with System.ComponentModel.[BrowsableAttribute(true)] (and an optional [DescriptionAttribute("...")]) if u want them to appear in the MOSS-WebPart-propertygrid.


//TODO: Connections

No comments: