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 884:        }
Line 885:        string sqlTin = "select * from (" + sql + ") as tb1 ";
Line 886:        int AllRowNumber = Connect.GetTable(sqlTin).Rows.Count;
Line 887:        ipTotalTinDangDanhMuc.Value = Convert.ToString(AllRowNumber);
Line 888:        sqlTin += "WHERE RowNumber BETWEEN (" + Pages + " - 1) * " + PageSize + " + 1 AND (((" + Pages + " - 1) * " + PageSize + " + 1) + " + PageSize + ") - 1";

Source File: c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\TinDang - Copy.aspx.cs    Line: 886

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   TinDang.LoadTinDang() in c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\TinDang - Copy.aspx.cs:886
   TinDang.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\TinDang - Copy.aspx.cs:227
   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