Server Error in '/' Application.

The call is ambiguous between the following methods or properties: 'ASP.ListHelper.Brands(string, string, string, string, string, string, string)' and 'ASP.ListHelper.Brands(System.Collections.Generic.IEnumerable<object>, string, 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: 'ASP.ListHelper.Brands(string, string, string, string, string, string, string)' and 'ASP.ListHelper.Brands(System.Collections.Generic.IEnumerable<object>, string, string, string)'

Source Error:


Line 106:                        <h2>Brands</h2>
Line 107:                        @if(Page.ActionId == "3" || Page.ActionId == "6") {
Line 108:                            @ListHelper.Brands(Page.DeptCode, Page.ClassCode, Page.SubclassCode)
Line 109:                        } else {
Line 110:                            @ListHelper.Brands()

Source File: c:\inetpub\wwwroot\Shared\Custom\_Layout.cshtml    Line: 108

Stack Trace:


[RuntimeBinderException: The call is ambiguous between the following methods or properties: 'ASP.ListHelper.Brands(string, string, string, string, string, string, string)' and 'ASP.ListHelper.Brands(System.Collections.Generic.IEnumerable<object>, string, string, string)']
   CallSite.Target(Closure , CallSite , Type , Object , Object , Object ) +190
   System.Dynamic.UpdateDelegates.UpdateAndExecute4(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) +265
   CallSite.Target(Closure , CallSite , Type , Object , Object , Object ) +415
   ASP._Page_Shared_Custom__Layout_cshtml.Execute() in c:\inetpub\wwwroot\Shared\Custom\_Layout.cshtml:108
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +131
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +90
   System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +231
   System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +80
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +63
   System.Web.WebPages.WebPageBase.PopContext() +263
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +98
   System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +231
   System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +80
   CallSite.Target(Closure , CallSite , _Page_ProductDetail_cshtml , Object ) +100
   ASP._Page_ProductDetail_cshtml.Execute() in c:\inetpub\wwwroot\ProductDetail.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +131
   System.Web.WebPages.StartPage.RunPage() +17
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +64
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +116


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