MVC3 RedirectToAction in a post method and ViewBag suppression
i'm currently working a list of data that i need to display in a view that represent a list and show for each item the corresponding action that can be executed, like edit them or delete them. For the edition there is no problem concedering that it's a particular view. My problem is when i want to delete an item, i have two choices in the post method. //Call directly the list [HttpPost] [Authorize] public ActionResult Delete(int itemId) { // logic to delete an item ViewBag.Error = ""; // The result of the execution return List(); } The thing with this solution is that the url is no longer the