public ActionResult DeleteProduct(int id, FormCollection collection) { ProductsDb dbProduct = new ProductsDb(); bool productValid; productValid = dbProduct.DeleteProduct(id); if (productValid) { return(RedirectToAction("Stock")); } else { return(RedirectToAction("DeleteProduct", id)); } }