title: Passing Id to bootstrap modal popup
body: <p>Here is working after tweak to JQuery:</p>
  
  <pre><code>$(.modalLink").click(function () {
       var passedID = $(this).data('id');
       $('#id').val(passedID);
       $(".modal-body .hiddenid").val(passedID);
  });
  </code></pre>
  
  <p>//View Link</p>
  
  <pre><code>&lt;a href="/Home/Employee/id=@item.Id" data-id="@item.Id" data-toggle="modal" data-target="#myModal"&gt;Load me&lt;/a&gt; 
  </code></pre>
  
  <p>How to capture the Id that I'm passing when the <code>&lt;a href</code> click?</p>
  
  <p>So I have a modal popup and when the user clicks I want to get the id of it when the user post the data.</p>
  
  <p>View:</p>
  
  <pre><code>@using (Html.BeginForm("Employee", "Home", FormMethod.Post))
  {
  
      &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;Record&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="FirstName" class="control-label"&gt;First Name:&lt;/label&gt;
                          @Html.Editor("FirstName", new { htmlAttributes = new { @class = "form-control" } }) 
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="LastName" class="control-label"&gt;Last Name:&lt;/label&gt;
                          @Html.Editor("LastName", new { htmlAttributes = new { @class = "form-control" } })
  
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                      &lt;button type="Submit" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;&lt;!-- /.modal-content --&gt;
          &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
      &lt;/div&gt;&lt;!-- /.modal --&gt;
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Employee(string id, string FirstName, string LastName)
  {
       //more work here..
       return View("Index");
  }
  </code></pre>