LocalRedirectResult 构造函数

定义

重载

LocalRedirectResult(String)

使用所提供的值初始化 LocalRedirectResult 类的一个新实例。

LocalRedirectResult(String, Boolean)

使用所提供的值初始化 LocalRedirectResult 类的一个新实例。

LocalRedirectResult(String, Boolean, Boolean)

使用所提供的值初始化 LocalRedirectResult 类的一个新实例。

LocalRedirectResult(String)

使用所提供的值初始化 LocalRedirectResult 类的一个新实例。

public:
 LocalRedirectResult(System::String ^ localUrl);
public LocalRedirectResult (string localUrl);
new Microsoft.AspNetCore.Mvc.LocalRedirectResult : string -> Microsoft.AspNetCore.Mvc.LocalRedirectResult
Public Sub New (localUrl As String)

参数

localUrl
String

要重定向到的本地 URL。

适用于

LocalRedirectResult(String, Boolean)

使用所提供的值初始化 LocalRedirectResult 类的一个新实例。

public:
 LocalRedirectResult(System::String ^ localUrl, bool permanent);
public LocalRedirectResult (string localUrl, bool permanent);
new Microsoft.AspNetCore.Mvc.LocalRedirectResult : string * bool -> Microsoft.AspNetCore.Mvc.LocalRedirectResult
Public Sub New (localUrl As String, permanent As Boolean)

参数

localUrl
String

要重定向到的本地 URL。

permanent
Boolean

指定重定向是永久 (301) 还是临时 (302) 。

适用于

LocalRedirectResult(String, Boolean, Boolean)

使用所提供的值初始化 LocalRedirectResult 类的一个新实例。

public:
 LocalRedirectResult(System::String ^ localUrl, bool permanent, bool preserveMethod);
public LocalRedirectResult (string localUrl, bool permanent, bool preserveMethod);
new Microsoft.AspNetCore.Mvc.LocalRedirectResult : string * bool * bool -> Microsoft.AspNetCore.Mvc.LocalRedirectResult
Public Sub New (localUrl As String, permanent As Boolean, preserveMethod As Boolean)

参数

localUrl
String

要重定向到的本地 URL。

permanent
Boolean

指定重定向是永久 (301) 还是临时 (302) 。

preserveMethod
Boolean

如果设置为 true,请将临时重定向 (307) 或永久重定向 (308) 保留初始请求的方法。

适用于