HttpResponse.StatusDescription プロパティ

定義

クライアントへ返される出力の HTTP ステータス文字列を取得または設定します。

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

プロパティ値

クライアントへ返される HTTP 出力のステータスを記述する文字列。 既定値は "OK" です。 有効な状態コードの一覧については、「 HTTP 状態コード」を参照してください。

例外

HTTP ヘッダーが送信された後に、StatusDescription が設定されています。

選択した値の長さが 512 を超えています。

次の例では、出力ストリームの状態文字列を確認します。 状態が "OK" と等しくない場合は、追加のコードが実行されます。

if (Response.StatusDescription != "OK")
{
    // ...
}
If Response.StatusDescription <> "OK" Then
    '...
End If

適用対象