Son of SmartPart v1.0 is here!

Here’s some good news for everybody that has been waiting for it: I’ve just uploaded the brand new Son of SmartPart to the GotDotNet site! First of all, what is the Son of SmartPart? This version of the SmartPart will allow you to run ASP.NET 2.0 Web User Controls and ASP.NET 2.0 Web Parts in SharePoint sites. Since WSS SP2 you can run your SharePoint sites on the .NET Framework version 2.0, and from now on you can use the power of the new platform to extend SharePoint.

What is working and what is not?
Not all features that I would like to be in v1.0 are available yet, so what is already working and what’s not? The Son of SmartPart (SOSP) comes in two flavours: one to run ASP.NET 2.0 User Controls (SOSP-UC) and one to run ASP.NET 2.0 Web Parts (SOSP-WP). For the SOSP-UC version, all the features from the previous version of the SmartPart are working, so you can expose custom properties, toolparts, create connectable web parts and so on. The SOSP-WP version only has the basic functionality to run ASP.NET 2.0 web parts. Advanced stuff like connections are not yet supported. Support for these advanced features will follow.

How do you install it?
If you download the release from the GotDotNet site, you will find an Installation Guide. I’ve also created a small screencast to guide you to this process. There is no automated installation yet because the current version of the deployment tools (STSADM and WPPackager) do not support .NET 2.0 assemblies (yet?).

What's next?
This is not the last release of the Son Of SmartPart! I'd love to hear your feedback so we can make the coming releases even better. For now: go get the latest version on and unleash the power of ASP.NET 2.0 on your SharePoint sites!


  • This is great stuff Jan. I intent on downloading and playing around with it later this afternoon.

    Bob Mixon

  • Good news! Can't wait to try this out. And btw, thank you for a GREAT training week in Denmark.

  • It was my pleasure Thomas!

  • Good work. Now you've opened the gates, you might want to add the following to your installation instructions:

    1) add WebResource.axd as a non-managed path.

    To get started, open Windows SharePoint Services Central Admin. In the "Virtual Server Configuration" section click the "Configure virtual server settings" link. In the virtual server list, click the server that you want to configure. (Most people only have "Default Web Site" here.)

    Now you are on the "Virtual Server Settings" page. In the section called "Virtual Server Management", click on "Define managed paths".

    Add "WebResource.axd" as non managed path.

    2) Add the 2.0 webcontrols as safe controls.

    Pretty basic:

    <SafeControl Assembly="System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />

    <SafeControl Assembly="System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" />

    3) please point the users to the fact that they must derive the user controls from SonOfSmartPart.IAdvancedUserControl and that they must add 2 member functions (see the samples, at least, that is how I got it to work)

    remark: for some reason I have not gotten a 2.0 treeview at work with a HoverNodeStyle. Just remove it, and it will work.

  • Hans and Jan,

    Are the notes from Hans truely a requirement? Thanks for clarifying. Also, please ammend the note from Hans to indicate that the "safe controls" section is located in the web.config file (some may not know that).

  • Any chance either of you could post a sample VS2005 .Net 2.0 sample? I'm having trouble getting mine to work.

    I have added the safecontrol section as Hans described, but am getting a Sharepoint error "The "SonOfSmartPartUC" Web Part appears to be causing a problem."

  • P.S. Your sample web control works fine.

  • And, for your sample code to compile, do I need sharepoint installed on my development station? I'm getting a build error "vs2005 the type or namespace name sharepoint does not exist in hte namespace"

  • And, What are the different versions (WP/UC) targeted to? When should I use one or the other?

  • Hi,
    I have a small problem with danish national charactors æøå when I load usercontrols.ascx through the smartpart interface.

    Only when I write æ (æ) for æ in the usercontrol does the character display as æ. If I simply write æ the character is not displayed in the rendered page.

    Anyone with an idea?


  • I was wondering if it would be possible to store ascx files in a web resource using the WebResourceAttribute and using Page.ClientScript.GetWebResourceUrl() to get the url to pass to Page.LoadControl()? I know the code behind would need to be compiled down to an assembly first.

    Only thing I see not working is you need to specify the mime type for the resource.

  • I have just managed to get the UC controls up and running on Sharepoint 2007 with great success! However if I try and use any of the Sharepoint 12 features I get a mismatch. When will you be releasing a version of the dll that uses 2007?

  • I receive:

    An unexpected error has occurred
    When trying to load my user control? I am using SonofsmartPart on Sharepoint services 2.0 with sp2...please please help me!

  • Where can I download Son of SmartPart? GotDotNet site is down.

  • You might want to see if you are running an HTTP module that checks session variables. It will fire on the WebResources.axd file but there will no session for a file of that type and an exception gets thrown but you will never know it because the module swallows it while in runtime for some reason. Only pages with the directive will have session.

    Check the context and get out of the module will fix it.

    System.Web.UI.Page page = Context.CurrentHandler as System.Web.UI.Page;
    if (page == null)

    Worked for me!

Comments have been disabled for this content.