Using the AJAX Control Toolkit in SharePoint

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!):
        <add assembly="AjaxControlToolkit, Version=1.0.10201.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
  3. Add the tagprefix for the Control Toolkit in the web.config:
        <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>

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: , , , , ,


  • I've tried to make it work,but it seems that it doesen't with the new version of AJAX Control Toolkit(1.0.10301).Perhaps because of the change of tagPrefix from "ajaxToolkit" to "cc1".But although i've made several changes,and tried in severel ways,i didn't manage to make it work...
    So,could you give me some help?


  • Thanks Jan! It works perfectly!

  • I'm just interested, is it work with MS SPP 2003?

  • when would the full version of ReturnOfSmartpart 1.1 come out. The AJAX functionality is just what I have been waiting for and am eagerly looking forward for the full version.

  • hi,

    is it possible to use the control toolkit from within SPS Designer?

    Or does it have to be done in pure code?


  • More problems!

    I've tried to put a tab panel in a custom list form.

    I'm using the code:


    Tab 2

    But when I look in the preview in SP Designer I get:

    Undefined Tag Prefix cc1.

    But I've used CC1 to define the tag in web.config.

    Can anyone help?


  • where can I get teh smart part code and doc? The gotdotnet site dosen't appear to work

  • Thanks Jan

    Your article was very helpful and I appericate that you are sharing your knowlede with peers.


  • I followed the approach.when uploading the webpart in the sharepoint iam getting this error.

    "Extender Controls may not be Registered before PreRender."

  • With the last version of Ajax Control Toolkit, assembly in web.config of Sharepoint:

  • With me also controls working only for 1 single AJAX postback

  • Also controls working only for 1 single AJAX postback.

  • I made all the config and wen i use just the ajax extensions components its ok , but when i use the ajax toolkit components gives, in the sharepoint, "unspected error...."
    (i used the to ways to access to AjaxControlToolkit.dll )

    what i'm doing wrong?

  • Ok this works nice

  • I'm attempting to use the HoverMenuExtender from the AjaxControlToolkit within a user control within the SmartPart in WSS 3.0.

    I am no longer getting an error (after making sure everything is in the web.config file) but the extender does not work (i.e. the rollover effect does not work).

    Is there anything else I need to do to allow the AjaxControlToolkit to work in WSS 3.0?


Comments have been disabled for this content.