Delen via


HttpStatusCodeResult Class

Definition

Provides a way to return an action result with a specific HTTP response status code and description.

public class HttpStatusCodeResult : System.Web.Mvc.ActionResult
type HttpStatusCodeResult = class
    inherit ActionResult
Public Class HttpStatusCodeResult
Inherits ActionResult
Inheritance
HttpStatusCodeResult
Derived

Constructors

HttpStatusCodeResult(HttpStatusCode, String)

Initializes a new instance of the HttpStatusCodeResult class using a status code and status description.

HttpStatusCodeResult(HttpStatusCode)

Initializes a new instance of the HttpStatusCodeResult class using a status code.

HttpStatusCodeResult(Int32, String)

Initializes a new instance of the HttpStatusCodeResult class using a status code and status description.

HttpStatusCodeResult(Int32)

Initializes a new instance of the HttpStatusCodeResult class using a status code.

Properties

StatusCode

Gets the HTTP status code.

StatusDescription

Gets the HTTP status description.

Methods

ExecuteResult(ControllerContext)

Enables processing of the result of an action method by a custom type that inherits from the ActionResult class.

Applies to