PageModel.BadRequest PageModel.BadRequest PageModel.BadRequest Method

Definition

Overloads

BadRequest() BadRequest() BadRequest()

Creates a BadRequestResult that produces a Status400BadRequest response.

BadRequest(ModelStateDictionary) BadRequest(ModelStateDictionary) BadRequest(ModelStateDictionary)

Creates a BadRequestObjectResult that produces a Status400BadRequest response.

BadRequest(Object) BadRequest(Object) BadRequest(Object)

Creates a BadRequestObjectResult that produces a Status400BadRequest response.

BadRequest() BadRequest() BadRequest()

Creates a BadRequestResult that produces a Status400BadRequest response.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest ();
abstract member BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
override this.BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
Public Overridable Function BadRequest () As BadRequestResult

Returns

BadRequest(ModelStateDictionary) BadRequest(ModelStateDictionary) BadRequest(ModelStateDictionary)

Creates a BadRequestObjectResult that produces a Status400BadRequest response.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);
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

Parameters

modelState
ModelStateDictionary ModelStateDictionary ModelStateDictionary

The ModelStateDictionary containing errors to be returned to the client.

Returns

BadRequest(Object) BadRequest(Object) BadRequest(Object)

Creates a BadRequestObjectResult that produces a Status400BadRequest response.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (object error);
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

Parameters

error
Object Object Object

An error object to be returned to the client.

Returns

Applies to