PageModel.RedirectToRoute Method

Definition

Overloads

RedirectToRoute(Object)

Redirects (Status302Found) to the specified route using the specified routeValues.

RedirectToRoute(String)

Redirects (Status302Found) to the specified route using the specified routeName.

RedirectToRoute(String, Object)

Redirects (Status302Found) to the specified route using the specified routeName and routeValues.

RedirectToRoute(String, String)

Redirects (Status302Found) to the specified route using the specified routeName and fragment.

RedirectToRoute(String, Object, String)

Redirects (Status302Found) to the specified route using the specified routeName, routeValues, and fragment.

RedirectToRoute(Object)

Redirects (Status302Found) to the specified route using the specified routeValues.

public:
 virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::Object ^ routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (object routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (object? routeValues);
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.

Applies to

RedirectToRoute(String)

Redirects (Status302Found) to the specified route using the specified routeName.

public:
 virtual Microsoft::AspNetCore::Mvc::RedirectToRouteResult ^ RedirectToRoute(System::String ^ routeName);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName);
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.

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);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, object routeValues);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName, object? routeValues);
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.

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);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, string fragment);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName, string? fragment);
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.

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);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string routeName, object routeValues, string fragment);
public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute (string? routeName, object? routeValues, string? fragment);
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.

Applies to