Export (0) Print
Expand All

HttpResponse.StatusDescription Property

Gets or sets the HTTP status string of the output returned to the client.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public string StatusDescription { get; set; }
/** @property */
public String get_StatusDescription ()

/** @property */
public void set_StatusDescription (String value)

public function get StatusDescription () : String

public function set StatusDescription (value : String)

Not applicable.

Property Value

A string describing the status of the HTTP output returned to the client. The default value is "OK".

Exception typeCondition

HttpException

StatusDescription is set after the HTTP headers have been sent.

ArgumentOutOfRangeException

The selected value has a length greater than 512.

The following code example checks the status string of the output stream. If the status is not equal to "OK", additional code is executed.

if (Response.StatusDescription != "OK")
{
    // ...
}

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft