public ActionResult DeleteProducts(int id) { try { bool result = po.DeleteProducts(id); if (result == true) { ViewBag.Message = "Customer Deleted Successfully"; ModelState.Clear(); } else { ViewBag.Message = "Unsucessfull"; ModelState.Clear(); } return(RedirectToAction("Index")); } catch { throw; } }