title: MVC Actionlink & Bootstrap Modal Submit
body: <p>I'm developing an MVC 5 web application. Within one of my Razor Views I have a table which spits outs several rows of data. Beside each row of data is a Delete button. When the user clicks the delete button I want to have the Bootstrap Modal popup and ask the user to confirm their deletion.</p>
  
  <pre><code>@foreach (var item in Model.Data) {
  &lt;tr&gt;
   &lt;td&gt;...&lt;/td&gt;
   &lt;td&gt;@Html.ActionLink("Delete", "Delete", new { id = item.ID }, new { @class = "btn btn-danger btn-xs", data_toggle = "modal", data_target = "#myModal" })&lt;/td&gt;
  &lt;/tr&gt;
  }
  </code></pre>
  
  <p>As it is, when the user clicks the Delete button the Modal pops up fine, but I can't seem to get the ID in the Actionlink parameter to pass to the Confirm button within my Modal so that it will then be sent to the delete action in my controller.</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
        &lt;div class="modal-content"&gt;
           &lt;div class="modal-header"&gt;
               &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
               &lt;h4 class="modal-title" id="myModalLabel"&gt;Delete Nomination&lt;/h4&gt;
           &lt;/div&gt;
           &lt;div class="modal-body"&gt;
             Are you sure you wish to delete this nomination?
           &lt;/div&gt;
           &lt;div class="modal-footer"&gt;
             &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
             &lt;button type="button" id="mySubmit" class="btn btn-primary"&gt;Confirm&lt;/button&gt;
           &lt;/div&gt;
         &lt;/div&gt;
        &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Can anyone please help?</p>
  
  <p>Thanks.</p>