Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试使用aspx页面中的jQuery对话框打开用户控件(包装在aspx页面中)作为弹出窗口_Jquery_Asp.net_User Controls_Jquery Dialog_Modalpopups - Fatal编程技术网

尝试使用aspx页面中的jQuery对话框打开用户控件(包装在aspx页面中)作为弹出窗口

尝试使用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

我试图在Aspx页面中使用jQuery对话框打开一个用户控件(Child.ascx)作为弹出窗口。 我在
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>