Editare

Partajați prin


HttpResponse.StatusDescription Property

Definition

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

public:
 property System::String ^ StatusDescription { System::String ^ get(); void set(System::String ^ value); };
public string StatusDescription { get; set; }
member this.StatusDescription : string with get, set
Public Property StatusDescription As String

Property Value

A string that describes the status of the HTTP output returned to the client. The default value is "OK". For a listing of valid status codes, see HTTP Status Codes.

Exceptions

StatusDescription is set after the HTTP headers have been sent.

The selected value has a length greater than 512.

Examples

The following 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")
{
    // ...
}
If Response.StatusDescription <> "OK" Then
    '...
End If

Applies to