RedirectResult RedirectResult RedirectResult Class

Definition

An ActionResult that returns a Found (302), Moved Permanently (301), Temporary Redirect (307), or Permanent Redirect (308) response with a Location header to the supplied URL.

public class RedirectResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult
type RedirectResult = class
    inherit ActionResult
    interface IKeepTempDataResult
    interface IActionResult
Public Class RedirectResult
Inherits ActionResult
Implements IActionResult, IKeepTempDataResult
Inheritance
RedirectResultRedirectResultRedirectResult
Implements

Constructors

RedirectResult(String) RedirectResult(String) RedirectResult(String)

Initializes a new instance of the RedirectResult class with the values provided.

RedirectResult(String, Boolean) RedirectResult(String, Boolean) RedirectResult(String, Boolean)

Initializes a new instance of the RedirectResult class with the values provided.

RedirectResult(String, Boolean, Boolean) RedirectResult(String, Boolean, Boolean) RedirectResult(String, Boolean, Boolean)

Initializes a new instance of the RedirectResult class with the values provided.

Properties

Permanent Permanent Permanent

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

PreserveMethod PreserveMethod PreserveMethod

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

Url Url Url

Gets or sets the URL to redirect to.

UrlHelper UrlHelper UrlHelper

Gets or sets the IUrlHelper for this result.

Methods

ExecuteResult(ActionContext) ExecuteResult(ActionContext) ExecuteResult(ActionContext)
ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext)

Applies to