If you have gotten this error before:
AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.
Follow the steps after
the jump and you will have your
Paraphrasing some of the blog, in case it ever goes down:
- Get the correct version of the toolkit: SharePoint compatible Toolkit.
- Reference the toolkit in your project, add markup to your page:
< %@ Register Assembly="AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
- Remember, here version 3.x version of Ajax Control Toolkit is used instead 3.5.
- Add Ajax Control Toolkit ScriptManager in master page.
- Register Ajax Control Toolkit namespaces in SharePoint package Designer.
Repeat, as of 9/5/211 (original post date 8/29/2010, according to the original blog post) the following still holds true over a year later:
The problem here is that latest versions of Ajax Control Toolkit is more optimized or targeted with .net framework 4.0. Even the Ajax control toolkit for .net framework 3.5 doesn’t work with SharePoint 2010. If you try to use Ajax Control Toolkit for 3.5 with SharePoint 2010, you may get the exceptions shown above. -sohel’s blog
If you have this issue, please post about it. I understand moving the technology forward and not necessarily supporting “old” frameworks, but this toolkit seems like it is pretty popular. If this is the state of affairs, I suggest that the nuget maintainers add this version of AjaxControlToolkit to Nuget and maybe write a tutorial describing this. In short, please support SharePoint 2010 a bit more than an MVP blog post only. I already submitted an issue through the Nuget gallery page. Thanks!
Full Instructions for the hack are here: