LocalRedirectResult 類別

定義

ActionResult 傳回 Found (302) 、已永久移動 (301) 、暫時重新導向 (307) 或永久重新導向 (308) 回應,並將位置標頭傳送至提供的本機 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
繼承
LocalRedirectResult

建構函式

LocalRedirectResult(String)

使用提供的值,初始化 LocalRedirectResult 類別的新執行個體。

LocalRedirectResult(String, Boolean)

使用提供的值,初始化 LocalRedirectResult 類別的新執行個體。

LocalRedirectResult(String, Boolean, Boolean)

使用提供的值,初始化 LocalRedirectResult 類別的新執行個體。

屬性

Permanent

取得或設定值,指定如果為 true 或為 false,則重新導向應該是永久的。

PreserveMethod

取得或設定重新導向會保留初始要求方法的指示。

Url

取得或設定要重新導向至的本機 URL。

UrlHelper

取得或設定這個結果的 IUrlHelper

方法

ExecuteResult(ActionContext)
已淘汰.

同步執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。

ExecuteResult(ActionContext)

同步執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。

(繼承來源 ActionResult)
ExecuteResultAsync(ActionContext)

以非同步方式執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。 此方法的預設實作會呼叫 ExecuteResult(ActionContext) 方法,並傳回已完成的工作。

ExecuteResultAsync(ActionContext)

以非同步方式執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。 此方法的預設實作會呼叫 ExecuteResult(ActionContext) 方法,並傳回已完成的工作。

(繼承來源 ActionResult)

適用於