RedirectToRouteHttpResult Class

Definition

An IResult that returns a Found (302), Moved Permanently (301), Temporary Redirect (307), or Permanent Redirect (308) response with a Location header. Targets a registered route.

public sealed class RedirectToRouteHttpResult : Microsoft.AspNetCore.Http.IResult
type RedirectToRouteHttpResult = class
    interface IResult
Public NotInheritable Class RedirectToRouteHttpResult
Implements IResult
Inheritance
RedirectToRouteHttpResult
Implements

Properties

Fragment

Gets the fragment to add to the URL.

Permanent

Gets the value that specifies that the redirect should be permanent if true or temporary if false.

PreserveMethod

Gets an indication that the redirect preserves the initial request method.

RouteName

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

RouteValues

Gets the route data to use for generating the URL.

Methods

ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Applies to