SeeOtherResult Class
Definition
- Namespace
- Cuemon.AspNetCore.Mvc
- Assemblies
- Cuemon.AspNetCore.Mvc.dll
An ActionResult that returns a SeeOther (303) response with a Location header to the supplied URL.
public class SeeOtherResult : StatusCodeResult, IClientErrorActionResult, IStatusCodeActionResult, IActionResult
- Inheritance
-
SeeOtherResult
- Implements
- Inherited Members
Examples
The following example shows how supports a 303 POST-redirect-GET response.
using System;
using Cuemon.AspNetCore.Mvc;
namespace MyApp.Examples;
public static class SeeOtherResultExample
{
public static void Demonstrate()
{
var result = new SeeOtherResult(new Uri("https://example.com/orders/42"));
Console.WriteLine(result.StatusCode);
Console.WriteLine(result.Location);
}
}
Constructors
| Name | Description |
|---|---|
| SeeOtherResult(Uri) | Initializes a new instance of the SeeOtherResult class. |
Properties
| Name | Description |
|---|---|
| Location | Gets the location of the URL to redirect to. |
Methods
| Name | Description |
|---|---|
| ExecuteResultAsync(ActionContext) | Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method. |