PageBase.BadRequest 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
BadRequest() |
BadRequestResult建立產生回應的 Status400BadRequest 。 |
BadRequest(ModelStateDictionary) | |
BadRequest(Object) |
BadRequest()
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
BadRequestResult建立產生回應的 Status400BadRequest 。
public:
virtual Microsoft::AspNetCore::Mvc::BadRequestResult ^ BadRequest();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest ();
public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
override this.BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
abstract member BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
override this.BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
Public Overridable Function BadRequest () As BadRequestResult
傳回
為回應建立 BadRequestResult 的 。
- 屬性
適用於
BadRequest(ModelStateDictionary)
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
public:
virtual Microsoft::AspNetCore::Mvc::BadRequestObjectResult ^ BadRequest(Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member BadRequest : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
override this.BadRequest : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
abstract member BadRequest : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
override this.BadRequest : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
Public Overridable Function BadRequest (modelState As ModelStateDictionary) As BadRequestObjectResult
參數
- modelState
- ModelStateDictionary
包含 ModelStateDictionary 要傳回給用戶端的錯誤。
傳回
為回應建立 BadRequestObjectResult 的 。
- 屬性
適用於
BadRequest(Object)
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
public:
virtual Microsoft::AspNetCore::Mvc::BadRequestObjectResult ^ BadRequest(System::Object ^ error);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (object error);
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (object error);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member BadRequest : obj -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
override this.BadRequest : obj -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
abstract member BadRequest : obj -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
override this.BadRequest : obj -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
Public Overridable Function BadRequest (error As Object) As BadRequestObjectResult
參數
- error
- Object
要傳回給用戶端的錯誤物件。
傳回
為回應建立 BadRequestObjectResult 的 。
- 屬性