0

我有一个使用 Sitefinity 3.7 SP2 开发的网站,该网站在服务器上成功运行。但是当我尝试在本地系统上运行时,通过在 asp.net 4.0 环境中集成项目。我收到以下错误:


 Compilation Error
 Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

 Compiler Error Message: CS0104: 'DynamicHyperLink' is an ambiguous reference between 'Telerik.Cms.Web.UI.DynamicHyperLink' and 'System.Web.DynamicData.DynamicHyperLink'

 Source Error:


 Line 15:             if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
 Line 16:             {
 Line 17:                 DynamicHyperLink link = item.FindControl("dhl") as DynamicHyperLink;
 Line 18:                 if (link != null)
 Line 19:                 {


 Source File: d:\Demo\miamiparking\Sitefinity\ControlTemplates\News\ListPageMaster.ascx    Line: 17


 Show Detailed Compiler Output:


 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 

请帮帮我,我该怎么办?

谢谢

4

1 回答 1

0

尝试使用:

Telerik.Cms.Web.UI.DynamicHyperLink link = 
                  item.FindControl("dhl") as Telerik.Cms.Web.UI.DynamicHyperLink;
于 2012-11-17T14:11:36.110 回答