Our code should now handle a delete. The next step is to change the HTML to pass in the ID. The ID must be passed in the
<form> postback. This is triggered by a submit button in an
<a> tag. A hidden
<input> tag can be used to store the ID in the browser until the user clicks Delete and does the
One new Bootstrap trick:
btn btn-danger btn-sm- make a small red button
In Pages/Continents/Index.cshtml, change the
<div> surrounding the Details and Edit buttons to a
<form>. Add the attribute
"submit" under the Edit
valueattribute should equal
- Its classes should be
btn-danger class is Bootstrap CSS for the color red.
Next add a hidden
<input> that can return the ID back to the server during the post.
valueshould be set to the current Continent item’s