using (Html.BeginForm())
will render an HTML <form>
element whose action
attribute is by default the current URI.
That means that if you are currently at /Dinner/Delete/5
, the form will post to that URI and the regular model binding will come into play, mapping the 5
to the {id}
route parameter.