0
我使用twitter引導模式與Asp.net Webforms。Twitter引導模式與Asp.net Webforms消失
事件發生後點擊按鈕btn提交,模態消失。
如何保持模態有效?
Example.aspx:
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<asp:TextBox ID="txtMessage" runat="server"></asp:TextBox>
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<asp:Button CssClass="btn btn-primary" ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
Example.aspx.cs
protected void btnSubmit_Click(object sender, EventArgs e)
{
txtMessage.Text = "Success!";
}