views:

24

answers:

1

I was trying to use ajax control toolkit in sharepoint 2010, but i get some errors. I found that the last release of the toolkit doesn't work with SP2010, so i downloaded the version 30930 found at http://ajaxcontroltoolkit.codeplex.com/releases/view/33804 Then i modified the web.config adding this:

<assemblies>
  ....
  <add assembly="AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />

I added the dll to the references (creating a new tab in the toolbox and browsing the dll file) and started using the ajax controls in my web part. It deploys without problems, but when i run my webpage i get this error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Which points to the first line of my webpart ascx file

Any ideas?

A: 

It looks like your web part references version 3.5.40412.0 of the AJAX Control Toolkit in an @Register directive. Since you want to use version 3.0.30930.28736, and since that version is properly referenced in your web.config, you should register the toolkit in your web part using its assembly name and namespace only, e.g.:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
    TagPrefix="ajax" %>
Frédéric Hamidi
I did't understand exactly what do you mean. Anyway, i've repeated the process, and this time works! I think it's because the first time i imported the ajax toolkit, i used the latest release (which isn't working), and therafter i have never modified the dll in the references. By removing it completely and by adding the older release dll to the references, it all works fine now =)
Maik

related questions