ControllerBase.RedirectToRoute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RedirectToRoute(Object) |
Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String) |
Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String, Object) |
Redirects (Status302Found) to the specified route using the specified
|
RedirectToRoute(String, String) |
Redirects (Status302Found) to the specified route using the specified
|
RedirectToRoute(String, Object, String) |
Redirects (Status302Found) to the specified route using the specified
|
RedirectToRoute(Object)
Redirects (Status302Found) to the specified route using the specified routeValues
.
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::Object ^ routeValues);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (object routeValues);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (object? routeValues);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member RedirectToRoute : obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoute : obj -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoute (routeValues As Object) As RedirectToRouteResult
Parameters
- routeValues
- Object
The parameters for a route.
Returns
The created RedirectToRouteResult for the response.
- Attributes
Applies to
RedirectToRoute(String)
Redirects (Status302Found) to the specified route using the specified routeName
.
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::String ^ routeName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member RedirectToRoute : string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoute : string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoute (routeName As String) As RedirectToRouteResult
Parameters
- routeName
- String
The name of the route.
Returns
The created RedirectToRouteResult for the response.
- Attributes
Applies to
RedirectToRoute(String, Object)
Redirects (Status302Found) to the specified route using the specified
routeName
and routeValues
.
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::String ^ routeName, System::Object ^ routeValues);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, object routeValues);
[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.
- routeValues
- Object
The parameters for a route.
Returns
The created RedirectToRouteResult for the response.
- Attributes
Applies to
RedirectToRoute(String, String)
Redirects (Status302Found) to the specified route using the specified
routeName
and fragment
.
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::String ^ routeName, System::String ^ fragment);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, string fragment);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName, string? fragment);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member RedirectToRoute : string * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoute : string * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoute (routeName As String, fragment As String) As RedirectToRouteResult
Parameters
- routeName
- String
The name of the route.
- fragment
- String
The fragment to add to the URL.
Returns
The created RedirectToRouteResult for the response.
- Attributes
Applies to
RedirectToRoute(String, Object, String)
Redirects (Status302Found) to the specified route using the specified
routeName
, routeValues
, and fragment
.
public:
virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::String ^ routeName, System::Object ^ routeValues, System::String ^ fragment);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, object routeValues, string fragment);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName, object? routeValues, string? fragment);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member RedirectToRoute : string * obj * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
override this.RedirectToRoute : string * obj * string -> Microsoft.AspNetCore.Mvc.RedirectToRouteResult
Public Overridable Function RedirectToRoute (routeName As String, routeValues As Object, fragment As String) As RedirectToRouteResult
Parameters
- routeName
- String
The name of the route.
- routeValues
- Object
The parameters for a route.
- fragment
- String
The fragment to add to the URL.
Returns
The created RedirectToRouteResult for the response.
- Attributes