Server Error in '/' Application.

The call is ambiguous between the following methods or properties: 'System.Web.Mvc.UrlHelper.Action(string, System.Web.Routing.RouteValueDictionary)' and 'System.Web.Mvc.UrlHelper.Action(string, string)'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The call is ambiguous between the following methods or properties: 'System.Web.Mvc.UrlHelper.Action(string, System.Web.Routing.RouteValueDictionary)' and 'System.Web.Mvc.UrlHelper.Action(string, string)'

Source Error:


Line 19:     @if (ViewBag.LeftCategoryTitle != "首页独立模块" && ViewBag.LeftCategoryTitle != ViewBag.CategoryTitle)
Line 20:     {
Line 21:          @(">") <a href="@Url.Action("Index", controllerName)">@(ViewBag.LeftCategoryTitle)</a>
Line 22:     }
Line 23:      > <span>@(ViewBag.CategoryTitle)</span></div>  

Source File: d:\web\web\Views\Public\List1.cshtml    Line: 21

Stack Trace:


[RuntimeBinderException: The call is ambiguous between the following methods or properties: 'System.Web.Mvc.UrlHelper.Action(string, System.Web.Routing.RouteValueDictionary)' and 'System.Web.Mvc.UrlHelper.Action(string, string)']
   CallSite.Target(Closure , CallSite , UrlHelper , String , Object ) +228
   System.Dynamic.UpdateDelegates.UpdateAndExecute3(CallSite site, T0 arg0, T1 arg1, T2 arg2) +265
   ASP._Page_Views_Public_List1_cshtml.Execute() in d:\web\web\Views\Public\List1.cshtml:21
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +255
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +124
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +108
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +659
   System.Web.Mvc.Controller.ExecuteCore() +146
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +92
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +60
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +36
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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