0
運行模式我有一個模式,我想從我的語氣背後的代碼運行:如何從代碼
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div dir="rtl" id="mymodal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalRapidAddLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="float: left">×</button>
<h3 id="myModalRapidAddLabel">Edit Brand</h3>
</div>
<div class="modal-body">
<p>Enter New Name</p>
<div class="control-group">
<div class="controls">
<asp:TextBox ID="txtnewname" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">cancel</button>
</div>
</div></ContentTemplate>
</asp:UpdatePanel>
而且我的代碼背後:
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "none","<script>$('#mymodal').modal('show');</script>", false);
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "mymodal", "$('#mymodal').modal();", true);
每一個地方我shearched此代碼必須運行模式,但這不適合我爲什麼?
查看您是否在客戶端得到任何錯誤?你的javascript代碼exerutes – Adil
任何錯誤,但當我代碼後面運行任何事情doesent happend – sadeq
是因爲你的模態是在更新面板? – ninja