以下是我的模态表格
<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);
问题是它没有显示模态形式的内容。但是当我点击按钮时,会加载一个空表单。
答案 0 :(得分:1)
将class="modal hide fade"
更改为class="modal fade"