7 Ocak 2015 Çarşamba

RedirectToAction with parameter


You can pass the any parameter as part of the routeValues parameter of the RedirectToAction() method.

return RedirectToAction("Action", new { id = 99 });
 
you can sperate with comas 

return RedirectToAction("Action", new { Message = ActionMessage.Added, id = 99 }); 

public enum ActionMessage
{
    Added,
    Updated,
    Deleted 
}