ApiController.RedirectToRoute(String, Object) Method

Definition

Creates a RedirectToRouteResult (302 Found) with the specified values.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, object routeValues);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member RedirectToRoute : string * obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoute : string * obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoute (routeName As String, routeValues As Object) As RedirectToRouteResult

Parameters

routeName
String

The name of the route to use for generating the URL.

routeValues
Object

The route data to use for generating the URL.

Returns

A RedirectToRouteResult with the specified values.

Attributes

Applies to