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 150:            else isIncCost = 0;
Line 151:            
Line 152:            IList lst = Products.getByCategoryId(_CategoryId, ref CategoryName, IsHomePage);
Line 153:            lblCategoryName.Text = CategoryName.ToUpper();
Line 154:            Page.Title = "Thế giới phim hd - " + CategoryName;

Source File: c:\Sites\thegioiphimhd.com\httpdocs\Controls\Products\product_list_by_category.ascx.cs    Line: 152

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   DiamonSoft.SqlDataProvider.ProductSqlDataProviders.getByCategoryId(Int16 CategryId, String& CategoryName, Byte isHomepage) in E:\DTC\Projects\WebApplication\thegioiphimhd\Version2\Source\Client\DiamonSoft.SqlDataProvider\Products\Products.cs:148
   DiamonSoft.Components.Methods.Products.getByCategoryId(Int16 CategoryId, String& CategoryName, Byte isHomepage) +62
   Controls_Products_product_list_by_category.BinData() in c:\Sites\thegioiphimhd.com\httpdocs\Controls\Products\product_list_by_category.ascx.cs:152
   Products_product_list_by_category.Page_Load(Object sender, EventArgs e) in c:\Sites\thegioiphimhd.com\httpdocs\products\product_list_by_category.aspx.cs:13
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


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