title: MVC Intercept Button Click for Modal Dialog
body: <p>I have a single MVC ASP.NET form with two buttons as such.</p>
  
  <pre><code>&lt;button id="btnAcceptAll" class="btn btn-lg btn-success" name="button" value="accept"&gt;&lt;i class="fa fa-check"&gt;&lt;/i&gt; Accept&lt;/button&gt;
  &lt;button id="btnRejectAll" class="btn btn-lg btn-danger" name="button" value="reject"&gt;&lt;i class="fa fa-times"&gt;&lt;/i&gt; Reject&lt;/button&gt;
  </code></pre>
  
  <p>And they get handled in my controller where I differentiate between the two buttons </p>
  
  <pre><code>[ActionName("Index")]
  [HttpPost]
  [AcceptVerbs(HttpVerbs.Post)]
  public ActionResult IndexPost(string button, QcMatchViewModel model)
  {}
  </code></pre>
  
  <p>And this all works perfectly, but I am trying to an extra piece of logic, where when the user clicks the reject button I also get pop up a dialog window and when they fill this in and hit enter the button the submits the page as normal.</p>
  
  <p>Was thinking something like this</p>
  
  <pre><code>$('#btnRejectAll').click(function(event) {
      event.preventDefault();
      $("#dialog-form").dialog("open");
  });
  </code></pre>
  
  <p>But then how do I get the button to submit as normal ?</p>