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 27:                 Entity = Convert2T(Tb);
Line 28:             }
Line 29:             Entity.Hd_Notes = Entity.Hd_Notes.Replace("PMingLiu;", "'Noto Sans TC',Helvetica,Arial,Lucida,sans-serif;").Replace("新細明體;", "'Noto Sans TC',Helvetica,Arial,Lucida,sans-serif;");
Line 30:             DataTable Tb_images = db.GetDataTable("SELECT top 1 [Hd_ImagePath],[Hd_Longitude],[Hd_Latitude] FROM [dbo].[SF_HouseData] where Hd_ObjID = '" + Hd_Id + "'", CommandType.Text);
Line 31:             if (Tb_images.Rows.Count == 1)

Source File: e:\wwwroot_customer\Ydhouse\New\detail.aspx.cs    Line: 29

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   YDHouseNew.New.detail.Page_Load(Object sender, EventArgs e) in e:\wwwroot_customer\Ydhouse\New\detail.aspx.cs:29
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +41
   System.Web.UI.Control.OnLoad(EventArgs e) +131
   System.Web.UI.Control.LoadRecursive() +65
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062