HttpResponse.StatusDescription 屬性


取得或設定傳回至用戶端的輸出之 HTTP 狀態字串。Gets or sets the HTTP status string of the output returned to the client.

 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 輸出的狀態。A string that describes the status of the HTTP output returned to the client. 預設值是「OK」。The default value is "OK". 如需有效狀態碼的清單,請參閱Http 狀態碼For a listing of valid status codes, see Http Status Codes.


StatusDescription 在 HTTP 標頭送出之後被設定。StatusDescription is set after the HTTP headers have been sent.

選取的值長度大於 512。The selected value has a length greater than 512.


下列範例會檢查輸出資料流程的狀態字串。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