Server Error in '/' Application.

Object reference not set to an instance of an object.

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: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 171:		var carDetails = productDetailManager.GetProductDetailByCatDetailID(new List<int>() { 250, 251, 252, 253, 254, 263 }, (int)inspectionOrder.CarModelID).ToList();
Line 172:
Line 173:		strCarDetailItem3 = "ظرفیت : " + carDetails.Where(x => x.CatDetailID == 252).FirstOrDefault().Value;
Line 174:		strCarDetailItem5 = "حجم موتور : " + carDetails.Where(x => x.CatDetailID == 254).FirstOrDefault().Value;
Line 175:		strCarDetailItem6 = "تعداد سیلندر : " + carDetails.Where(x => x.CatDetailID == 253).FirstOrDefault().Value;

Source File: c:\inetpub\vhosts\carmizan.com\httpdocs\Exhibition\ShowCar.aspx.cs    Line: 173

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Exhibition_ShowCar.LoadInspectionDetails() in c:\inetpub\vhosts\carmizan.com\httpdocs\Exhibition\ShowCar.aspx.cs:173
   Exhibition_ShowCar.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\carmizan.com\httpdocs\Exhibition\ShowCar.aspx.cs:102
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


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