title: ASP.NET MVC 3 Multiple Submit Inputs in One Form
body: <p>I am currently having an issue with multiple action buttons being in the same form.</p>
  
  <p>The first button would perform verification while the second button would save profile. The third would simple redirect the user out of the page, but they are still required to go through controller some tracking purposes. Last button is delete. Because they are placed together and I do need ModelBinding passed through POST, it's impossible to separate them into multiple forms.</p>
  
  <p>Currently, in order to differentiate which action is being clicked, I have a hidden input in my form and onclick, javascript would update the hidden input so that it will be passed back to the controller.</p>
  
  <p>The reason I did this was because for some weird reasons, FormCollection doesn't want to hold my submit values. I tried accessing buttons in controller via </p>
  
  <pre><code>formCollection["verify"]
  </code></pre>
  
  <p>But it turns out to be null. Both id and name of the input submit is set to verify.</p>
  
  <p>I also tried a lot of other suggestions like <a href="http://weblogs.asp.net/dfindley/archive/2009/05/31/asp-net-mvc-multiple-buttons-in-the-same-form.aspx" rel="noreferrer">this</a> and <a href="http://blog.ashmind.com/2010/03/15/multiple-submit-buttons-with-asp-net-mvc-final-solution/" rel="noreferrer">this</a> but to no avail. Is there a better approach to my problem without using javascript to alter hidden inputs?</p>