I would like to use the appropriate HTTP method whenever possible. In this case, when the button is pressed to delete something, I want to start the controller action using the [HttpDelete]
attribute. However, I cannot create the form using this method - using the Razor syntax. There is no option for Delete
in the FormMethod
element, and doing the following does not cancel it:
@using (Html.BeginForm("Order", "Users", FormMethod.Post, new { method = "DELETE" }))
Finding solutions gives nothing, nobody does it? I know I can just use POST, but isn't this the start point of the HTTP method to start with?
Josh M.
source share