Server Error in '/' Application.

Cannot perform runtime binding on a null reference

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: Cannot perform runtime binding on a null reference

Source Error:


Line 112:            }
Line 113:
Line 114:            var PdTitleMeta = Product.GetPDTitleFromAdmin(ProductId);
Line 115:            if(PdTitleMeta != null && PdTitleMeta.Trim() != "") {
Line 116:                Title = PdTitleMeta;

Source File: c:\inetpub\wwwroot\_PageStart.cshtml    Line: 114

Stack Trace:


[RuntimeBinderException: Cannot perform runtime binding on a null reference]
   CallSite.Target(Closure , CallSite , Object ) +115
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +629
   CallSite.Target(Closure , CallSite , Object ) +223
   ASP.Product.GetPDTitleFromAdmin(String ProductId) +746
   ASP._Page__PageStart_cshtml.Execute() in c:\inetpub\wwwroot\_PageStart.cshtml:114
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +46
   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.7.3163.0