2010-10-13 81 views
1

我正在嘗試在SharePoint 2010中使用ajax控件工具包,但我收到了一些錯誤。我發現,該工具包的最後一個版本不SP2010工作,所以我發現下載的版本在30930 http://ajaxcontroltoolkit.codeplex.com/releases/view/33804 然後我修改了web.config中添加此:ajax控件工具包&Sharepoint 2010

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

我添加的dll的引用(在工具箱中創建一個新標籤並瀏覽dll文件),並開始在我的Web部件中使用ajax控件。它可以部署沒有問題,但是當我跑我的網頁我得到這個錯誤:

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) 

指向我的WebPart ASCX文件

任何想法的第一線?

回答

2

看起來您的Web部件在@Register指令中引用了AJAX Control Toolkit的版本3.5.40412.0。既然你要使用版本3.0.30930.28736,由於該版本是在正確的web.config引用,你應該使用其組件名,僅命名空間,例如,在你的Web部件註冊該工具包:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" 
    TagPrefix="ajax" %> 
+0

我完全不明白你的意思。無論如何,我已經重複了這個過程,而且這個時間起作用了!我認爲這是因爲我第一次導入ajax工具包,我使用了最新版本(這不起作用),並且我從未修改過引用中的dll。通過完全刪除它,並通過將舊版本的dll添加到引用,它現在可以正常工作=) – Maik 2010-10-13 09:37:12