title: Bootstrap modal background won't disappear
body: <p>So I have this <em>sign in</em> page using <code>Bootstrap</code>s <code>modal</code>. However after the call has finished the <code>modal</code> disappears as it should. Except for the black background. How can I make sure that the background disappears as well?</p>
  
  <p>My _Menu.cshtml:</p>
  
  <pre><code>&lt;div id="menu"&gt;
      &lt;div class="modal fade" id="form_login" role="dialog" aria-labelledby="form_LoginLabel" aria-hidden="true"&gt;
          &lt;div class="modal-dialog reset"&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"&gt;Login&lt;/h4&gt;
                  &lt;/div&gt;
  
                  @using (Ajax.BeginForm("SignIn", "Account", new AjaxOptions() { UpdateTargetId = "menu", InsertionMode = InsertionMode.Replace, HttpMethod = "POST", OnSuccess="CloseModal()" }, new { @class = "form-inline", @role = "form" }))
                  {
                      &lt;div class="modal-body"&gt;
                          @if(ViewBag.Message != null)
                          {
                              &lt;p class="alert alert-warning"&gt;@ViewBag.Message&lt;/p&gt;
                          }
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="sr-only" for="email"&gt;Email&lt;/label&gt;
                              &lt;input class="form-control" type="email" id="email" name="email" placeholder="Enter email" value="" required="required" /&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;label class="sr-only" for="password"&gt;Password&lt;/label&gt;
                              &lt;input class="form-control" type="password" id="password" name="password" placeholder="Enter password" value="" required="required" /&gt;
                          &lt;/div&gt;
  
                          &lt;span id="message-login-loading" class="alert hidden"&gt;&lt;/span&gt;
                          &lt;span id="message-login-error" class="alert alert-danger hidden"&gt;&lt;/span&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-success" id="login" &gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt; Sign in&lt;/button&gt;
                          @Html.ActionLink("Register", "Register", "Account", null, new { @class = "btn btn-primary" })
                      &lt;/div&gt;
                  }
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><br/>
  AccountController:</p>
  
  <pre><code>    public ActionResult PartialMenu()
      {
          var model = ProfileSession.Session;
          return PartialView("_Menu", model);
      }
  
      public ActionResult SignIn(string email, string password)
      {
          Login login = loginRep.GetByEmailAndPassword(email, password);
  
          if (login != null)
          {
              ProfileSession.Session = profileRep.GetById(login.fk_profile);
              return RedirectToAction("PartialMenu", "Home");
          }
  
          ViewBag.Message("Email or password is incorrect");
  
          return RedirectToAction("PartialMenu");
      }
  </code></pre>