asp.net MVC

How to use RedirectToAction in asp.net MVC?

How to use RedirectToAction in asp.net MVC?, someone asked me to explain?

In this Article, I explain how to use RedirectToAction in asp.net mvc. Why we use RedirectToAction?. For using RedirectToAction function we have to redirect your controller from one to another with different type of views.  Here I demonstrate with simple example of using RedirectToAction method with passing parameters(Arguments).

Syntax

return RedirectToAction("actionName", "ControllerName",routevalue);

example

 return RedirectToAction("Index","controller", new { id = value });

Post your comments / questions