ResponseExtensions.SetStatus 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
SetStatus(HttpResponseBase, Int32) |
Sets the HTTP status code of an HTTP response using the specified integer value. |
SetStatus(HttpResponseBase, HttpStatusCode) |
Sets the HTTP status code of an HTTP response using the specified HTTP status code enumeration value. |
SetStatus(HttpResponseBase, Int32)
Sets the HTTP status code of an HTTP response using the specified integer value.
public static void SetStatus(this System.Web.HttpResponseBase response, int httpStatusCode);
static member SetStatus : System.Web.HttpResponseBase * int -> unit
<Extension()>
Public Sub SetStatus (response As HttpResponseBase, httpStatusCode As Integer)
Parameters
- response
- HttpResponseBase
The HTTP response instance.
- httpStatusCode
- Int32
The HTTP status code.
Applies to
SetStatus(HttpResponseBase, HttpStatusCode)
Sets the HTTP status code of an HTTP response using the specified HTTP status code enumeration value.
public static void SetStatus(this System.Web.HttpResponseBase response, System.Net.HttpStatusCode httpStatusCode);
static member SetStatus : System.Web.HttpResponseBase * System.Net.HttpStatusCode -> unit
<Extension()>
Public Sub SetStatus (response As HttpResponseBase, httpStatusCode As HttpStatusCode)
Parameters
- response
- HttpResponseBase
The HTTP response instance.
- httpStatusCode
- HttpStatusCode
The HTTP status code