Handling a button click in MVC, why is there a string parameter?
- by SLC
I'm following this awful textbook, going through the basics of create/edit/delete records. The delete bit has a confirm button, and it is handled like so:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Delete(int id, string confirmButton) {
It offers no explanation of why the button is passed as a string or how MVC interprets it.
Can anyone help clarify what's going on here? The Create code has no such string being passed.