ApiController.Redirect Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Redirect(Uri) |
Creates a RedirectResult (302 Found) with the specified value. |
Redirect(String) |
Creates a RedirectResult (302 Found) with the specified value. |
Redirect(Uri)
- Source:
- ApiController.cs
- Source:
- ApiController.cs
Creates a RedirectResult (302 Found) with the specified value.
[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
Parameters
- location
- Uri
The location to which to redirect.
Returns
A RedirectResult with the specified value.
- Attributes
Applies to
Redirect(String)
- Source:
- ApiController.cs
- Source:
- ApiController.cs
Creates a RedirectResult (302 Found) with the specified value.
[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
Parameters
- location
- String
The location to which to redirect.
Returns
A RedirectResult with the specified value.
- Attributes