HttpResponseBase.StatusCode 屬性

定義

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

public:
 virtual property int StatusCode { int get(); void set(int value); };
public virtual int StatusCode { get; set; }
member this.StatusCode : int with get, set
Public Overridable Property StatusCode As Integer

屬性值

Int32

傳回至用戶端之 HTTP 輸出的狀態碼。The status code of the HTTP output that is returned to the client. 如需有效狀態碼的詳細資訊,請參閱 HTTP 狀態碼For information about valid status codes, see HTTP Status Codes.

例外狀況

永遠。Always.

適用於