ApiController.Redirect 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Redirect(Uri) |
RedirectResult使用指定的值建立 (302 Found) 。 |
Redirect(String) |
RedirectResult使用指定的值建立 (302 Found) 。 |
Redirect(Uri)
RedirectResult使用指定的值建立 (302 Found) 。
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectResult Redirect (Uri location);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Redirect : Uri -> Microsoft.AspNetCore.Mvc.RedirectResult
override this.Redirect : Uri -> Microsoft.AspNetCore.Mvc.RedirectResult
Public Overridable Function Redirect (location As Uri) As RedirectResult
參數
- location
- Uri
要重新導向的位置。
傳回
RedirectResult具有指定值的 。
- 屬性
適用於
Redirect(String)
RedirectResult使用指定的值建立 (302 Found) 。
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectResult Redirect (string location);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Redirect : string -> Microsoft.AspNetCore.Mvc.RedirectResult
override this.Redirect : string -> Microsoft.AspNetCore.Mvc.RedirectResult
Public Overridable Function Redirect (location As String) As RedirectResult
參數
- location
- String
要重新導向的位置。
傳回
RedirectResult具有指定值的 。
- 屬性