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.RedirectResultPublic Overridable Function Redirect (location As Uri) As RedirectResultParameters
- 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.RedirectResultPublic Overridable Function Redirect (location As String) As RedirectResultParameters
- location
- String
The location to which to redirect.
Returns
A RedirectResult with the specified value.
- Attributes