Export (0) Print
Expand All

ControllerExtensions.RedirectToAction<TController> Method (Controller, Expression<Action<TController>>)

Redirects to the specified parameters using the type controller, controller and action.

Namespace:  Microsoft.Web.Mvc
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

public static RedirectToRouteResult RedirectToAction<TController>(
	this Controller controller,
	Expression<Action<TController>> action
where TController : Controller

Type Parameters


The type controller.


Type: System.Web.Mvc.Controller
The controller.
Type: System.Linq.Expressions.Expression<Action<TController>>
The action.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult
The redirect result object.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Controller. When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936(v=vs.118).aspx or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.118).aspx.
© 2014 Microsoft