【问题标题】:Bootstrap modal form doesn't show contentBootstrap 模态表单不显示内容
【发布时间】:2014-10-27 05:55:21
【问题描述】:

以下是我的模态表单

<div id="editModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="editModalLabel">Detailed View</h3>
    </div>
    <div class="modal-body">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <table class="table">
                    <tr>
                        <td>Role Name : 
                        <asp:Label ID="lblRoleName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div class="modal-footer">
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </div>
</div>

我在点击按钮时像下面这样称呼它

System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append(@"<script type='text/javascript'>");
sb.Append("$('#editModal').modal('show');");
sb.Append(@"</script>");
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "EditModalScript", sb.ToString(), false);

问题是它不显示模态表单的内容。但是当我单击按钮时会加载一个空表单。

【问题讨论】:

    标签: jquery twitter-bootstrap


    【解决方案1】:

    class="modal hide fade" 更改为class="modal fade"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-03
      • 2018-02-03
      • 1970-01-01
      • 2016-01-30
      • 1970-01-01
      • 2018-01-03
      • 2019-01-09
      • 2020-05-05
      相关资源
      最近更新 更多