protected void OutlineRadioButtonList_SelectedIndexChanged(object sender, EventArgs e) { string categoryIdString = OutlineRadioButtonList.SelectedValue; DataSet categoryDataset = null; if (null == Cache["category"]) { NewsDAO newsDao = new NewsDAO(); categoryDataset = newsDao.GetAllCategory(); Cache.Insert("category", categoryDataset, null, DateTime.UtcNow.AddMinutes(10), System.Web.Caching.Cache.NoSlidingExpiration); } else { categoryDataset = Cache["category"] as DataSet; if (null == categoryDataset) { NewsDAO newsDao = new NewsDAO(); categoryDataset = newsDao.GetAllCategory(); Cache.Insert("category", categoryDataset, null, DateTime.UtcNow.AddMinutes(10), System.Web.Caching.Cache.NoSlidingExpiration); } } this.CategoryDropDownList.DataSource = categoryDataset.Tables[categoryIdString]; this.CategoryDropDownList.DataTextField = "name"; this.CategoryDropDownList.DataValueField = "id"; this.CategoryDropDownList.DataBind(); }