title: Bootstrap modal popup opens and closes immediately
body: <p>I have a bootstrap popup displaying student results but it opens and closes immediately. my master page file has following included js files</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head runat="server"&gt;
     &lt;title&gt;&lt;/title&gt;
       &lt;asp:ContentPlaceHolder ID="head" runat="server"&gt;
       &lt;/asp:ContentPlaceHolder&gt;
     &lt;script src="jquery-1.12.3.min.js" type="text/javascript"&gt;&lt;/script&gt;
     &lt;script src="js/bootstrap.js" type="text/javascript"&gt;&lt;/script&gt;
     &lt;link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /&gt;  
  &lt;/head&gt;
  </code></pre>
  
  <p>and my webpage has no file included for bootstrap only a jquery timer file</p>
  
  <pre><code>&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;
  &lt;link href="css/jquery.countdownTimer.css" rel="stylesheet" type="text/css" /&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>The code for modal is as below</p>
  
  <pre><code>&lt;div class="modal fade" id="myModalTest" role="dialog"&gt;
  &lt;div class="modal-dialog"&gt;
  
    &lt;!-- Modal content--&gt;
    &lt;div class="modal-content"&gt;
      &lt;div class="modal-header"&gt;
       &lt;%-- &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;--%&gt;
        &lt;h4 class="modal-title text-center"&gt;RESULT&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
         &lt;table class="table table-bordered" style="background-color:White" cellpadding="10" cellspacing="10"&gt;
      &lt;tr&gt;
          &lt;td class="style1"&gt;
              &lt;p class="text-justify"&gt;&lt;asp:Label runat="server" ID="Label1" Text="Test Name :"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label runat="server" ID="lbltest"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="style1"&gt;
              &lt;asp:Label runat="server" ID="lblName" Text="Student Name :"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label runat="server" ID="lbluname"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
       &lt;/tr&gt;
       &lt;tr&gt;
          &lt;td class="style1"&gt;
              &lt;asp:Label runat="server" ID="lblmks" Text="Total marks scored :"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label runat="server" ID="lblmarksscored"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="style1"&gt;
              &lt;asp:Label runat="server" ID="Label2" Text="Total questions attempted :"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label runat="server" ID="lbltot"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="style1"&gt;
              &lt;asp:Label runat="server" ID="Label3" Text="Total questions in Test :"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label runat="server" ID="lbltotalTestQ"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
   &lt;/table&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
        &lt;asp:Button class="btn btn-default" runat="server" ID="btnBackModal" Text="back" OnClick="btnBackModal_Click"/&gt;
       &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Even the back button's ie btnBackModal OnClick event does not fire. When I debugged the code the control does not go to that event on the server side.</p>
  
  <pre><code> public void btnBackModal_Click(object sender, EventArgs e)
      {
          if (isSaved == 0)
              saveAnswer();
          Response.Redirect("StudentHome.aspx");
      }
  </code></pre>