public ActionResult Delete(category cat) { try { CategoryDal ct = new CategoryDal(); ct.DeleteProduct(cat.CategoryID); return(RedirectToAction("Index")); } catch { return(View()); } }