您的位置:首页 > 编程语言 > ASP

ASP.Net 的按钮事件中显示ASPxPopupControl,控件显示不出来

2017-09-25 18:05 645 查看
弹出 控件代码:

  <dxpc:ASPxPopupControl  ID="PopJCJH" ClientInstanceName="PopJCJH" runat="server" EnableClientSideAPI="True"

           EnableHierarchyRecreation="True"  Width="630px" Height="500px" Modal="True"  ShowCloseButton="true"

            ShowHeader="true" ShowShadow="False">

button定义:

 <asp:ImageButton runat="server" ID="IBPlanOfAudit" 

                            imageurl="~/icon/system_search.gif" onclick="IBPlanOfAudit_Click"  >

后台代码:

  protected void IBPlanOfAudit_Click(object sender, ImageClickEventArgs e)

     {

         this.PopJCJH.HeaderText = "****"; 

         this.PopJCJH.ContentUrl = "E*****n_In*****on.aspx"; //弹出页面

      

     }

按照上面的代码写,devexpress,是弹不出弹出框的,只是简单的对页面进行一次刷新。

解决方法

将ASPxPopupControl控件与触发该控件弹出的按钮绑定在一起。
 也就是:给dxpc:ASPxPopupControl控件添加PopupElementID属性,属性值为触发该pop弹出控件的id 在这里就是IBPlanOfAudit。
        
<dxpc:ASPxPopupControl  ID="PopJCJH" ClientInstanceName="PopJCJH" runat="server" EnableClientSideAPI="True"

          PopupElementID="IBPlanOfAudit" 
 EnableHierarchyRecreation="True"  Width="630px" Height="500px" Modal="True"  ShowCloseButton="true"

            ShowHeader="true" ShowShadow="False">
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐