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 202:
Line 203:        DataTable tbTinDang = Connect.GetTable(sqlTinDang);
Line 204:        if (tbTinDang.Rows.Count > 0)
Line 205:        {
Line 206:            if (Request.Cookies["TungTang_User"] != null && Request.Cookies["TungTang_User"].ToString() != "")

Source File: c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\PostDetail.aspx.cs    Line: 204

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   TinDangChiTiet.LoadTinDang() in c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\PostDetail.aspx.cs:204
   TinDangChiTiet.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\PostDetail.aspx.cs:59
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2853


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