PageModel.StatusCode 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
StatusCode(Int32) |
StatusCodeResult通过指定 |
StatusCode(Int32, Object) |
ObjectResult通过指定 |
StatusCode(Int32)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
StatusCodeResult通过指定 statusCode
创建 对象。
public:
virtual Microsoft::AspNetCore::Mvc::StatusCodeResult ^ StatusCode(int statusCode);
public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode (int statusCode);
abstract member StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
override this.StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
Public Overridable Function StatusCode (statusCode As Integer) As StatusCodeResult
参数
- statusCode
- Int32
要对响应设置的状态代码。
返回
为响应创建的 StatusCodeResult 对象。
适用于
StatusCode(Int32, Object)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
- Source:
- PageModel.cs
ObjectResult通过指定 statusCode
和 创建 对象value
public:
virtual Microsoft::AspNetCore::Mvc::ObjectResult ^ StatusCode(int statusCode, System::Object ^ value);
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object value);
abstract member StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
override this.StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
Public Overridable Function StatusCode (statusCode As Integer, value As Object) As ObjectResult
参数
- statusCode
- Int32
要对响应设置的状态代码。
- value
- Object
要在 ObjectResult 上设置的值。
返回
为响应创建的 ObjectResult 对象。