Handling a button click in MVC, why is there a string parameter?
Posted
by SLC
on Stack Overflow
See other posts from Stack Overflow
or by SLC
Published on 2010-04-06T10:17:10Z
Indexed on
2010/04/06
10:23 UTC
Read the original article
Hit count: 180
asp.net-mvc
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.
© Stack Overflow or respective owner