//Handle the delete button click event public void Delete_Article(Object sender, RepeaterCommandEventArgs e) { if ((e.CommandName == "Delete")) { //Instantiate article delete object ArticleInfo DeleteArticle = new ArticleInfo(); DeleteArticle.ID = Convert.ToInt32(e.CommandArgument); Caching.PurgeCacheItems("Newest_Articles"); Caching.PurgeCacheItems("ArticleCategory_SideMenu"); //Perform delete DeleteArticle.Delete(); //Release allocated memory DeleteArticle = null; //Redirect to confirm delete page Response.Redirect("articlemanager.aspx"); } }
//Handle the delete button click event public void Delete_Article(Object sender, RepeaterCommandEventArgs e) { if ((e.CommandName == "Delete")) { //Instantiate article delete object ArticleInfo DeleteArticle = new ArticleInfo(); DeleteArticle.ID = Convert.ToInt32(e.CommandArgument); Caching.PurgeCacheItems("Newest_Articles"); Caching.PurgeCacheItems("ArticleCategory_SideMenu"); //Perform delete DeleteArticle.Delete(); //Release allocated memory DeleteArticle = null; //Redirect to confirm delete page Response.Redirect("articlemanager.aspx"); } }