Sunday, April 17, 2011

Using the AJAX Control Toolkit with SharePoint 2010 !

The problem is that the latest build of the Ajax Control Toolkit is optimized for .net 4.0. Where SharePoint is still 3.5.

So I fixed this issue by downloading a previous release
http://ajaxcontroltoolkit.codeplex.com/releases/view/33804
.

So I downloaded the latest 3.5 AjaxControlToolkit binary and stuck it into GAC.

I added the following to Sharepoint Foundation 2010 web.config of the site:

      <assemblies>

        <add assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />

      </assemblies>

      <controls>

        <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />

      </controls>

    <SafeControls>

      <SafeControl Assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TypeName="*" Safe="True" />

    </SafeControls>

I changed the v4.master Page ScriptManager:

From: <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />

To: <ajaxToolkit:ToolkitScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true"
/>

 

No comments:

Post a Comment