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 299:    {
Line 300:        GenerateIcon gi = new GenerateIcon();
Line 301:        switch (propDet.CategoryId)
Line 302:        {
Line 303:            case 1:

Source File: c:\Websites\LuxHouse\DesktopModules\Presto\PropertyDetails\PropertyDetails.ascx.cs    Line: 301

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   PropertyDetails.GeneratePropertyIcon() in c:\Websites\LuxHouse\DesktopModules\Presto\PropertyDetails\PropertyDetails.ascx.cs:301
   PropertyDetails.Page_Load(Object sender, EventArgs e) in c:\Websites\LuxHouse\DesktopModules\Presto\PropertyDetails\PropertyDetails.ascx.cs:46
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   Rainbow.UI.WebControls.PortalModuleControl.OnLoad(EventArgs e) in c:\Websites\LuxHouse\App_Code\UI\WebControls\PortalModuleControl.cs:674
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +9883051
   System.Web.UI.ControlCollection.Add(Control child) +87
   System.Web.UI.WebControls.RowControlCollection.Add(Control child) +39
   DUEMETRI.UI.WebControls.DesktopPanes.CreateControlHierarchy() +1364
   DUEMETRI.UI.WebControls.DesktopPanes.CreateChildControls() +33
   System.Web.UI.Control.EnsureChildControls() +97
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +906


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