Bootstrap Modal not working if offline link is used in ASP.Net

Last Reply on Dec 21, 2016 03:04 AM By jerryhien

Posted on Dec 21, 2016 02:43 AM

Hi Consultant,

I'm following this page and the code working ok (using bootstrap 3.3.2):

But my project is using Bootstrap 3.3.7 and it not working



<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="BootstrapModalDialogPopup.aspx.cs" Inherits="Test_BootstrapModalDialogPopup" %>

<html xmlns="">
<head runat="server">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->    
    <script src="../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
    <script src="layout/bootstrap3.3.7/js/bootstrap.js"></script>
    <link href="layout/bootstrap3.3.7/css/bootstrap.css" rel="stylesheet" />
    <%--<link href="" rel="stylesheet" />    
    <script src=""></script>            --%>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    <div class="container">
        <div class="row">
                Hello, world! Hello, world!</h1>            
            <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
                Launch demo modal
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <!-- Modal -->
                    <asp:Label ID="Label1" runat="server" Text=""></asp:Label><br />
                    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                        <span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel">
                                        Modal title</h4>
                                <div class="modal-body">
                                    <asp:TextBox ID="TextBox1" runat="server" placeholder="First Name" class="form-control"></asp:TextBox><br />
                                    <asp:TextBox ID="TextBox2" runat="server" placeholder="Middle Name" class="form-control"></asp:TextBox><br />
                                    <asp:TextBox ID="TextBox3" runat="server" placeholder="Last Name" class="form-control"></asp:TextBox><br />
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">
                                    <asp:Button Text="Save" OnClick="Submit" runat="server" />



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Test_BootstrapModalDialogPopup : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)


    protected void Submit(object sender, EventArgs e)
        string str = TextBox1.Text + TextBox2.Text + TextBox3.Text;
        int x = 0; 

Thanks you very much for your read!

You are viewing reply posted by: jerryhien on Dec 21, 2016 03:04 AM.
Posted on Dec 21, 2016 03:04 AM
AnandM says: <script type="text/javascript" src=""></script> <script type="text/javascript" src=""></script> <link rel="stylesheet" href="" />

Thanks you very much

I foud it, it's miss the character: '/' before the layout

it's working now.