尝试使用aspx页面中的jQuery对话框打开用户控件(包装在aspx页面中)作为弹出窗口
我试图在Aspx页面中使用jQuery对话框打开一个用户控件(Child.ascx)作为弹出窗口。 我在尝试使用aspx页面中的jQuery对话框打开用户控件(包装在aspx页面中)作为弹出窗口,jquery,asp.net,user-controls,jquery-dialog,modalpopups,Jquery,Asp.net,User Controls,Jquery Dialog,Modalpopups,我试图在Aspx页面中使用jQuery对话框打开一个用户控件(Child.ascx)作为弹出窗口。 我在Child.aspx文件中包装了Child.ascx。现在,在Main.aspx中,我想将**Child.aspx**作为弹出窗口调用 Main.aspx: <script type="text/javascript"> $(document).ready(function () { $('#btnMemo').click(function
Child.aspx
文件中包装了Child.ascx
。现在,在Main.aspx
中,我想将**Child.aspx**
作为弹出窗口调用
Main.aspx:
<script type="text/javascript">
$(document).ready(function () {
$('#btnMemo').click(function () {
$.blockUI({ message: '<h1> Processing...</h1>' });
var ControlName = "Child.ascx";
$.ajax({
type: "POST",
url: "Child.aspx/Result",
data: "{controlName:'" + ControlName + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
$.unblockUI();
********* /// Code to open the popup ***********
// $('#result').dialog(response.d);
},
failure: function (msg) {
$.unblockUI();
///// $('#result').html(msg);
}
});
});
});
</script>
..................
<td>
<asp:ImageButton ID="btnMemo" runat="server" AlternateText="Memo" CausesValidation="false" ClientIDMode ="Static" />
<div id="divMemoInfo" title="Memo"></div>
</td>
Child.aspx
<body>
<form id="form1" runat="server">
<div id="result">
</div>
</form>
</body>
请给我一些建议
谢谢
BB您可以在弹出窗口中打开child.aspx。您可以通过两个步骤完成此操作: 1) 使用$(“#child”)在主页的隐藏容器中加载child.aspx。加载
2) 使用以下对话框打开弹出窗口:$(“#child”)。对话框…您可以在弹出窗口中打开child.aspx。您可以通过两个步骤完成此操作: 1) 使用$(“#child”)在主页的隐藏容器中加载child.aspx。加载 2) 使用以下对话框打开弹出窗口:$(“#子”)。对话框
<body>
<form id="form1" runat="server">
<div id="result">
</div>
</form>
</body>