CreatedResult 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
, ActionResult 傳回具有 Location 標頭的已建立 (201) 回應。
public ref class CreatedResult : Microsoft::AspNetCore::Mvc::ObjectResult
C#
public class CreatedResult : Microsoft.AspNetCore.Mvc.ObjectResult
C#
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(201)]
public class CreatedResult : Microsoft.AspNetCore.Mvc.ObjectResult
type CreatedResult = class
inherit ObjectResult
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(201)>]
type CreatedResult = class
inherit ObjectResult
Public Class CreatedResult
Inherits ObjectResult
- 繼承
- 屬性
Created |
初始化 CreatedResult 類別的新執行個體 |
Created |
使用提供的值,初始化 CreatedResult 類別的新執行個體。 |
Created |
使用提供的值,初始化 CreatedResult 類別的新執行個體。 |
Content |
取得或設定 MediaTypeCollection。 (繼承來源 ObjectResult) |
Declared |
取得或設定宣告的類型。 (繼承來源 ObjectResult) |
Formatters |
的 IOutputFormatter 集合。 (繼承來源 ObjectResult) |
Location |
取得或設定建立內容的位置。 |
Status |
取得或設定 HTTP 狀態碼。 (繼承來源 ObjectResult) |
Value |
物件結果。 (繼承來源 ObjectResult) |
Execute |
同步執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。 (繼承來源 ActionResult) |
Execute |
以非同步方式執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。 (繼承來源 ObjectResult) |
On |
這個方法會在格式器寫入輸出資料流程之前呼叫。 |
產品 | 版本 |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |