To get started with the ASP.NET AJAX extensions in SharePoint 2007, check out my previous posts:

Once you fell in love with ASP.NET AJAX, you have to check out the ASP.NET AJAX Control Toolkit! The ASP.NET AJAX Control Toolkit provides a set of sample controls and extenders that makes it a snap to spice up your web site with rich functionality. Think about the Control Toolkit as a bunch of sexy controls which use the ASP.NET AJAX extensions, plus a framework to create a new even sexier control on your own. In this post I’ll describe how you can make use of the Control Toolkit in your SharePoint 2007 sites, for example by using the SmartPart.

Actually SharePoint doesn’t differ from any other ASP.NET web site to use the Control Toolit, there are only three things that you need to do:

  1. Make sure SharePoint has access to AjaxControlToolkit.dll
    You can do this in two ways: either you deploy the assembly to the Global Assembly Cache (GAC) or you put in the \BIN folder of the SharePoint site’s folder.
  2. Add an assembly reference in the web.config (note: for the future versions of the Control Tookit, the version number can change!):
    <assemblies>
        …
        <add assembly=”AjaxControlToolkit, Version=1.0.10201.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e”/>
        ….
    </assemblies>
  3. Add the tagprefix for the Control Toolkit in the web.config:
    <controls>
        …
        <add namespace=”AjaxControlToolkit” assembly=”AjaxControlToolkit” tagPrefix=”ajaxToolkit”/>
        ….
    </controls>

That’s it! Now you can make use of the Control Toolkit coolness in your SharePoint 2007 sites! If you want to test if the Control Toolkit is working on your installation: I’ve upload a very small example to CodePlex.

 

 

Technorati tags: sharepoint, wss, moss, web parts, ajax, smartpart