title: Bootstrap modal form does not close after submit
body: <p>What I need to do is to show a popup to add a new record to my database, im using bootstrap 3 and I love it because im not using a single line of jquery, and I have really nice form (obvioulsy they are based in jquery). </p>
  
  <p>I am validating my form via ajax, but the problem now is that my modal never closes, when I try to redirect to an Action the action is loaded inside my modal, so my question is how do I stop my modal?</p>
  
  <p>This is an example of what this code does:</p>
  
  <p>My form:</p>
  
  <p><img src="https://i.stack.imgur.com/LIddv.png" alt="enter image description here"></p>
  
  <p>My form when when validated:</p>
  
  <p><img src="https://i.stack.imgur.com/rQpTD.png" alt="enter image description here"></p>
  
  <p>this is perfect with this code:</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;Add Car&lt;/h4&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              @using (Ajax.BeginForm("ModalAdd", new AjaxOptions() {UpdateTargetId = "mymodalform"}))
              {
                  &lt;div id="mymodalform"&gt;
                      @Html.Partial("CreatePartialView", new Car())
                  &lt;/div&gt;
              }
          &lt;/div&gt;
      &lt;/div&gt;&lt;!-- /.modal-content --&gt;
  &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
  </code></pre>
  
  <p></p>
  
  <p>and my partial:</p>
  
  <pre><code>@model ControliBootstrap.Models.Car
  
      &lt;div class="form-horizontal" &gt;
      @Html.ValidationSummary(true)
  
      &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.Model, new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.EditorFor(model =&gt; model.Model)
              @Html.ValidationMessageFor(model =&gt; model.Model)
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!--More fields--&gt;
  
      &lt;div class="form-group"&gt;
          &lt;div class="col-md-offset-2 col-md-10"&gt;
              &lt;input type="submit" value="Create" class="btn btn-default"/&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the problem now is than when model is valid in my controller I go to Index Action which is loaded inside my modal so my question again is how do I close my modal?</p>
  
  <p><img src="https://i.stack.imgur.com/kmsnF.png" alt="enter image description here"></p>
  
  <p>here is my controller:</p>
  
  <pre><code>public ActionResult ModalAdd(Car car)
      {
          if (ModelState.IsValid)
          {
              db.Cars.Add(car);
              db.SaveChanges();
              return RedirectToAction("Index");
          }
  
          return PartialView("CreatePartialView",car);
      }
  </code></pre>