HttpResponseWrapper.StatusCode 属性

定义

获取或设置返回到客户端的输出的 HTTP 状态代码。

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

属性值

Int32

返回到客户端的 HTTP 输出的状态代码。 默认值为 200。 有关有效状态代码的信息,请参阅 HTTP 状态代码

例外

发送 HTTP 标头后设置 StatusCode

适用于