ControllerBase.RedirectToAction Method

Definition

Overloads

RedirectToAction(String)

Redirects (Status302Found) to the specified action using the actionName.

RedirectToAction(String, Object)

Redirects (Status302Found) to the specified action using the actionName and routeValues.

RedirectToAction(String, String)

Redirects (Status302Found) to the specified action using the actionName and the controllerName.

RedirectToAction(String, String, Object)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and routeValues.

RedirectToAction(String, String, String)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and fragment.

RedirectToAction(String, String, Object, String)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, routeValues, and fragment.

RedirectToAction(String)

Redirects (Status302Found) to the specified action using the actionName.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction (string actionName);
Parameters
actionName
String

The name of the action.

Returns

The created RedirectToActionResult for the response.

RedirectToAction(String, Object)

Redirects (Status302Found) to the specified action using the actionName and routeValues.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction (string actionName, object routeValues);
Parameters
actionName
String

The name of the action.

routeValues
Object

The parameters for a route.

Returns

The created RedirectToActionResult for the response.

RedirectToAction(String, String)

Redirects (Status302Found) to the specified action using the actionName and the controllerName.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction (string actionName, string controllerName);
Parameters
actionName
String

The name of the action.

controllerName
String

The name of the controller.

Returns

The created RedirectToActionResult for the response.

RedirectToAction(String, String, Object)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and routeValues.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction (string actionName, string controllerName, object routeValues);
Parameters
actionName
String

The name of the action.

controllerName
String

The name of the controller.

routeValues
Object

The parameters for a route.

Returns

The created RedirectToActionResult for the response.

RedirectToAction(String, String, String)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and fragment.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction (string actionName, string controllerName, string fragment);
Parameters
actionName
String

The name of the action.

controllerName
String

The name of the controller.

fragment
String

The fragment to add to the URL.

Returns

The created RedirectToActionResult for the response.

RedirectToAction(String, String, Object, String)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, routeValues, and fragment.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction (string actionName, string controllerName, object routeValues, string fragment);
Parameters
actionName
String

The name of the action.

controllerName
String

The name of the controller.

routeValues
Object

The parameters for a route.

fragment
String

The fragment to add to the URL.

Returns

The created RedirectToActionResult for the response.

Applies to