ControllerBase.LocalRedirect(String) 方法

定义

创建一个 LocalRedirectResult 对象,该对象将 (Status302Found) 重定向到指定的本地 localUrl

public:
 virtual Microsoft::AspNetCore::Mvc::LocalRedirectResult ^ LocalRedirect(System::String ^ localUrl);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirect (string localUrl);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member LocalRedirect : string -> Microsoft.AspNetCore.Mvc.LocalRedirectResult
override this.LocalRedirect : string -> Microsoft.AspNetCore.Mvc.LocalRedirectResult
Public Overridable Function LocalRedirect (localUrl As String) As LocalRedirectResult

参数

localUrl
String

要重定向到的本地 URL。

返回

为响应创建的 LocalRedirectResult

属性

适用于