By default, Bootstrap javascript files are included immediately before the closing tag
<script src="vendors/jquery-1.9.1.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> <script src="vendors/easypiechart/jquery.easy-pie-chart.js"></script> <script src="assets/scripts.js"></script> </body>
I took these javascript files in the chapter section right before the body tag, and I wrote a small function to call a modal popup:
<script src="vendors/jquery-1.9.1.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> <script src="vendors/easypiechart/jquery.easy-pie-chart.js"></script> <script src="assets/scripts.js"></script> <script type="text/javascript"> function openModal() { $('#myModal').modal('show'); } </script> </head> <body>
then I could trigger a modal popup with the code below:
protected void lbEdit_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this,this.GetType(),"Pop", "openModal();", true); }
source share