我使用 ASP.NET 和 jQuery,我使用对话框。在此对话框中,我有 Web 控件。如果我单击对话框中的按钮,则对话框关闭,但如果我在此对话框中搜索用户,我不希望对话框关闭:(
这是我的问题的一个例子:
如果我单击 lupe 符号,我可以在我们的 Active Directory 中打开一个用于搜索用户的对话框。
但是如果我点击对话框上的搜索按钮,那么它首先关闭,如果我打开对话框,我可以看到找到的用户:/
如果我单击选项卡“Signatur”,我会遇到同样的问题如果我单击按钮,则页面会使用选项卡“Abwesenheit”加载新页面,但是如果我单击选项卡“signatur”agein,则会创建 Signatur :(
我的代码:(对话框的 jquery 代码)
$(document).ready(function () {
$("#dialog").dialog({
autoOpen: false,
modal: true,
resizable: false,
height: 450,
width: 600,
closeOnEscape: false,
buttons: {
}
});
$("#dialog").parent().appendTo($("form:first"));
$("#DialogOpen").click(function () {
$("#dialog").dialog("open");
$("#dialog").parent().appendTo($("form:first"));
return false;
});
});
这是我的 ASPX:
<div id="dialog" title="Vertreterliste">
<asp:TextBox ID="txtBox" runat="server" ></asp:TextBox>
<asp:ImageButton ID="imageSearch" runat="server"
ImageUrl="~/Theme/Pictures/lupe.jpg" Height="24px" Width="25px"
onclick="imageSearch_Click" />
<hr />
<asp:ListView runat="server" ID="myListView" OnItemCommand="myListView_ItemCommand"
OnSelectedIndexChanging="myListView_SelectedIndexChanging">
....
</asp:ListView>
</div>
如果我单击 Web 控件,我该怎么做才能使对话框不关闭:/