“/”应用程序中的服务器错误。

无法对 null 引用执行运行时绑定

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 无法对 null 引用执行运行时绑定

源错误:


行 4:  		var Id = GetID("id");       
行 5:         dynamic model = Table("Products").Where("ID=" + Id).DataModel(); 
行 6:  	   var mo = Table("ProductCat").Where("id=" +model.CID).DataModel();
行 7:  %>
行 8:  <!DOCTYPE html>

源文件: d:\wwwroot\hightopmachinery\m\productinfo.aspx    行: 6

堆栈跟踪:


[RuntimeBinderException: 无法对 null 引用执行运行时绑定]
   CallSite.Target(Closure , CallSite , Object ) +115
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +430
   CallSite.Target(Closure , CallSite , Object ) +240
   ASP.productinfo_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\wwwroot\hightopmachinery\m\productinfo.aspx:6
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4075.0