protected void Page_Load(object sender, EventArgs e) { if (Category != null && Category.CategoryId > 0) { List <Category> cat = CategoryCache.AllCategories().FindAll(delegate(Category c) { return(c.ParentId == Category.CategoryId); }); if (cat.Count > 0) { pnlNarrowCatagory.Visible = true; pnlNarrowCatagory.GroupingText = category.Name; rptNarrowCatagory.DataSource = cat; rptNarrowCatagory.DataBind(); } } }