【问题标题】:Modal Pop Extender Inside Update Panel更新面板内的模态弹出扩展器
【发布时间】:2011-02-05 04:06:28
【问题描述】:

我有一个由 gridview onRowCommand 触发的模式弹出扩展器。 网格视图和模态弹出扩展器位于不同的更新面板中。 分配给 mpe 的 PopupControlID 的面板包含一个文本框和一个按钮。 此按钮将触发一个页面方法 Web 服务,该服务将返回一个要分配给文本框的值。 我的问题是当我单击按钮时,在部分回发后,mpe 消失(隐藏)。 我想尽一切办法让它显示出来。下面是我的代码。

  function Completed(result) {

        //get the target textbox inside the mpe
        var txt = '<%= txtContractNo.ClientID  %>';
        var txtRef = document.getElementById(txt);

        txtRef.value = result;

        var mpeId = '<%= mpeContract.ClientID %>';
        $find(mpeId).show();
    }

如何在部分回发后显示? 提前致谢

【问题讨论】:

    标签: asp.net ajax modalpopupextender


    【解决方案1】:

    尝试使用此代码在部分回发后触发它

    <script type="text/javascript">
        // init the endRequest trigger
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(EndRequest);
    
        // inside here run your update code, open your box, what ever
        function EndRequest(sender, args) {
        }
    </script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-24
      • 1970-01-01
      • 2013-11-09
      • 2011-08-16
      • 1970-01-01
      • 1970-01-01
      • 2011-06-11
      • 1970-01-01
      相关资源
      最近更新 更多