LocalRedirectResult 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 local URL.

public ref class LocalRedirectResult : Microsoft::AspNetCore::Mvc::ActionResult
public class LocalRedirectResult : Microsoft.AspNetCore.Mvc.ActionResult
type LocalRedirectResult = class
    inherit ActionResult
Public Class LocalRedirectResult
Inherits ActionResult
Inheritance
LocalRedirectResult

Constructors

LocalRedirectResult(String)

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

LocalRedirectResult(String, Boolean)

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

LocalRedirectResult(String, Boolean, Boolean)

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

Properties

Permanent

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

PreserveMethod

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

Url

Gets or sets the local URL to redirect to.

UrlHelper

Gets or sets the IUrlHelper for this result.

Methods

ExecuteResult(ActionContext)
Obsolete.

Executes the result operation of the action method synchronously. This method is called by MVC to process the result of an action method.

ExecuteResult(ActionContext)

Executes the result operation of the action method synchronously. This method is called by MVC to process the result of an action method.

(Inherited from ActionResult)
ExecuteResultAsync(ActionContext)

Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method. The default implementation of this method calls the ExecuteResult(ActionContext) method and returns a completed task.

ExecuteResultAsync(ActionContext)

Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method. The default implementation of this method calls the ExecuteResult(ActionContext) method and returns a completed task.

(Inherited from ActionResult)

Applies to