'/' 應用程式中發生伺服器錯誤。

'System.Web.Mvc.HandleErrorInfo' 不包含 'categoryList' 的定義

描述: 在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外狀況詳細資訊: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'System.Web.Mvc.HandleErrorInfo' 不包含 'categoryList' 的定義

原始程式錯誤:


行 1113:                <ul class="nav-list">
行 1114:                    @* -- 因為 Layout 未有綁 ViewModel, 故這裡的 Model 是指每一使用 Layout.cshtml 的 RenderBody 所綁的 ViewModel *@
行 1115:                    @if (Model != null && Model.categoryList != null && Model.vitemcategoryList != null)
行 1116:                    {
行 1117:                        @*大分類*@

原始程式檔: d:\System\GashMall\WebApplication\GASHMall\Views\Shared\_Layout.cshtml    行: 1115

堆疊追蹤:


[RuntimeBinderException: 'System.Web.Mvc.HandleErrorInfo' 不包含 'categoryList' 的定義]
   CallSite.Target(Closure , CallSite , Object ) +216
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +344
   CallSite.Target(Closure , CallSite , Object ) +221
   ASP._Page_Views_Shared__Layout_cshtml.Execute() in d:\System\GashMall\WebApplication\GASHMall\Views\Shared\_Layout.cshtml:1115
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +125
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +209
   System.Web.WebPages.WebPageBase.PopContext() +162
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +347
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288


版本資訊: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34274