public ActionResult DoDelete(string categoryName) { DataOperator dop = new DataOperator(Runtime.SqlConfig); dop.Delete(categoryName); Article mArticle = new Article(); mArticle.ACategoryName = categoryName; var list = dop.Select(mArticle, "", "", 10, 0); //cms系统要改 foreach(var item in list) { var article = item as Article; article.ACategoryName = "0"; dop.Update(article); } TemplateDataHelper.Categories = null; return Redirect("/Admin/Success.do"); }