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 64:             ds = bll.GetByCategory(categoryID, 1, Pager.PageIndex, Pager.PageSize, sort);
Line 65:             Category cat = new CategoryBLL(AppContext.CurrentSiteID).GetByID(int.Parse(Request["CategoryID"]), 1);
Line 66:             PageControl.Breadcrumb = URLHelper.BuildBreadcrumb(cat.CategoryName, URLHelper.GetSubText(this.articleType), this.SubPage, "c");
Line 67:             Pager.TotalRecords = Pager1.TotalRecords = bll.GetByCategory(categoryID,1,1, 0).Count;
Line 68:             (this.Page.Master as MasterPageBase).Keyword = cat.CategoryName;

Source File: e:\websitepanel\khinenthuyluc1\khinentl.viennam.info\wwwroot\Pages\Products.ascx.cs    Line: 66

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Pages_Products.BindData() in e:\websitepanel\khinenthuyluc1\khinentl.viennam.info\wwwroot\Pages\Products.ascx.cs:66
   PageControl.OnInit(EventArgs e) in e:\websitepanel\khinenthuyluc1\khinentl.viennam.info\wwwroot\App_Code\PageControl.cs:32
   System.Web.UI.Control.InitRecursive(Control namingContainer) +134
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +191
   System.Web.UI.ControlCollection.Add(Control child) +86
   _Default.LoadControl() in e:\websitepanel\khinenthuyluc1\khinentl.viennam.info\wwwroot\Default.aspx.cs:63
   _Default.OnInitComplete(EventArgs e) in e:\websitepanel\khinenthuyluc1\khinentl.viennam.info\wwwroot\Default.aspx.cs:25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +617


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