我有一個jQuery模態窗口一個問題,從更新面板內的按鈕被稱爲..jQuery UI的對話與更新面板ASP按鍵觸發
這裏的見解..
的Javascript用於開啓在aspx頁面jQuery的模態對話框..
<script type='text/javascript'>
function openModalDiv(divname) {
$('#' + divname).dialog({
autoOpen: false,
bgiframe: true,
closeOnEscape: true,
modal: true,
resizable: false,
height: 'auto',
buttons: { Ok: function() { closeModalDiv(divname) } },
open: function (event, ui) { jQuery('.ui-dialog-titlebar-close').hide(); }
});
$('#' + divname).dialog('open');
('#' + divname).parent().appendTo($('form:FrmSearch'));
$('#' + divname).css('overflow', 'hidden')
}
function closeModalDiv(divname) {
$('#' + divname).dialog('close');
}
</script>
在aspx頁面..按鈕
<asp:UpdatePanel ID="upDialogs" runat="server">
<ContentTemplate>
<asp:Button ID="btnOpenDialog" runat="server" Text="Open Dialog" onclick="btnOpenDialog_Click" />
</ContentTemplate>
</asp:UpdatePanel>
這需要從通過JavaScript代碼隱藏調用的股利..
<div id="ErrorDiv2" title="Error" style="visibility:hidden">
<p><span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>Please select an option among the results and try again!</p>
</div>
最後後面的代碼..
protected void btnOpenDialog_Click(object sender, EventArgs e)
{
if (ProfileID == null)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "ErrorDivOpen", "document.getElementById('ErrorDiv2').style.visibility = 'visible';", true);
Page.ClientScript.RegisterStartupScript(this.GetType(), "ErrorDivShow", "openModalDiv('ErrorDiv2');", true);
}
}
現在詳細問題.. 沒有更新面板中的模態對話框持久性有機污染物很不錯,但充分後回..
我想只有部分回發,因此正在使用更新面板..
以下是我試過的解決方案..
- 將更新面板添加到現有的div,dint工作。
- 添加RUNAT =「服務器」沿着股利,仍然力工作的最新面板..
任何一個可以幫助我與可能的解決方案?