Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RedirectToAction Method

Controller.RedirectToAction Method

 

Returns an HTTP 302 response to the browser, which causes the browser to make a GET request to the specified action.

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

NameDescription
System_CAPS_protmethodRedirectToAction(String)

Redirects to the specified action using the action name.

System_CAPS_protmethodRedirectToAction(String, Object)

Redirects to the specified action using the action name and route values.

System_CAPS_protmethodRedirectToAction(String, RouteValueDictionary)

Redirects to the specified action using the action name and route dictionary.

System_CAPS_protmethodRedirectToAction(String, String)

Redirects to the specified action using the action name and controller name.

System_CAPS_protmethodRedirectToAction(String, String, Object)

Redirects to the specified action using the action name, controller name, and route dictionary.

System_CAPS_protmethodRedirectToAction(String, String, RouteValueDictionary)

Redirects to the specified action using the action name, controller name, and route values.

Return to top

Controller.RedirectToAction Method (String)

Redirects to the specified action using the action name.

protected internal RedirectToRouteResult RedirectToAction(
	string actionName
)

Parameters

actionName
Type: System.String

The name of the action.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect result object.

Return to top

Controller.RedirectToAction Method (String, Object)

Redirects to the specified action using the action name and route values.

protected internal RedirectToRouteResult RedirectToAction(
	string actionName,
	object routeValues
)

Parameters

actionName
Type: System.String

The name of the action.

routeValues
Type: System.Object

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect result object.

Return to top

Controller.RedirectToAction Method (String, RouteValueDictionary)

Redirects to the specified action using the action name and route dictionary.

protected internal RedirectToRouteResult RedirectToAction(
	string actionName,
	RouteValueDictionary routeValues
)

Parameters

actionName
Type: System.String

The name of the action.

routeValues
Type: System.Web.Routing.RouteValueDictionary

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect result object.

Return to top

Controller.RedirectToAction Method (String, String)

Redirects to the specified action using the action name and controller name.

protected internal RedirectToRouteResult RedirectToAction(
	string actionName,
	string controllerName
)

Parameters

actionName
Type: System.String

The name of the action.

controllerName
Type: System.String

The name of the controller.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect result object.

Return to top

Controller.RedirectToAction Method (String, String, Object)

Redirects to the specified action using the action name, controller name, and route dictionary.

protected internal RedirectToRouteResult RedirectToAction(
	string actionName,
	string controllerName,
	object routeValues
)

Parameters

actionName
Type: System.String

The name of the action.

controllerName
Type: System.String

The name of the controller.

routeValues
Type: System.Object

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect result object.

Return to top

Controller.RedirectToAction Method (String, String, RouteValueDictionary)

Redirects to the specified action using the action name, controller name, and route values.

protected internal virtual RedirectToRouteResult RedirectToAction(
	string actionName,
	string controllerName,
	RouteValueDictionary routeValues
)

Parameters

actionName
Type: System.String

The name of the action.

controllerName
Type: System.String

The name of the controller.

routeValues
Type: System.Web.Routing.RouteValueDictionary

The parameters for a route.

Return Value

Type: System.Web.Mvc.RedirectToRouteResult

The redirect result object.

Return to top
Show:
© 2015 Microsoft