クライアントへ返される出力の HTTP ステータス文字列を取得または設定します。
名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public Property StatusDescription As String
'使用
Dim instance As HttpResponse
Dim value As String
value = instance.StatusDescription
instance.StatusDescription = value
public string StatusDescription { get; set; }
public:
property String^ StatusDescription {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_StatusDescription ()
/** @property */
public void set_StatusDescription (String value)
public function get StatusDescription () : String
public function set StatusDescription (value : String)
適用できません。
プロパティ値
クライアントへ返される HTTP 出力のステータスを記述する文字列。既定値は "OK" です。有効なステータス コードの一覧については、「Http 状態コード」を参照してください。
例外
例外の種類 | 条件 |
---|---|
HTTP ヘッダーが送信された後に、StatusDescription が設定されています。 |
|
選択した値の長さが 512 を超えています。 |
使用例
次のコード例では、出力ストリームのステータス文字列を確認します。ステータスが "OK" と等しくない場合は、追加のコードが実行されます。
If Response.StatusDescription <> "OK" Then
'...
End If
if (Response.StatusDescription != "OK")
{
// ...
}
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0