【问题标题】:UserControl CancelControlID working for all other controls?UserControl CancelControlID 适用于所有其他控件?
【发布时间】:2013-03-19 05:43:24
【问题描述】:

您好,我创建了一个弹出式用户控件,它绝对可以正常工作,但是当我单击关闭按钮以外的其他按钮时,它正在关闭..

这是我的代码,

       <ajax:ModalPopupExtender ID="ModalPopupContextInfo" runat="server" 
             TargetControlID="btnShowEditContextPopup" PopupControlID="pnlpopupContextInfo"
           CancelControlID="imgClose" BackgroundCssClass="modalBackground">
       </ajax:ModalPopupExtender>
     < asp:Panel ID="pnlpopupContextInfo" DefaultButton="imgbtnUpdate" runat="server" BackColor="White" Height="360px" Width="400px" Style="display: none" >

       <asp:ImageButton ID="imgClose" runat="server" ImageUrl="~/image_repository/cancelButton.png" ToolTip="Close" />
      ..................
       // Code for Labels and text boxes..
         <asp:ImageButton ID="imgbtnCancel" runat="server" CausesValidation="false" TabIndex="8" ImageUrl="~/image_repository/cancel.png" />
         <asp:ImageButton ID="imgbtnUpdate" runat="server" CausesValidation="false" TabIndex="8" ImageUrl="~/image_repository/UpdateVoyage.png" />
       </asp:Panel>  

在这里,当我单击更新或取消按钮时,弹出窗口也将关闭.. 如何响应来自父 Web 表单(aspx 页面)的用户控件按钮(此处更新)单击事件

谁能帮忙

【问题讨论】:

    标签: c# .net ajaxcontroltoolkit modalpopupextender


    【解决方案1】:

    因为你没有采取行动。例如,您应该添加 onclick="Cancel_Click1"。并在服务器端添加动作。

    【讨论】:

      猜你喜欢
      • 2019-11-29
      • 2011-07-23
      • 1970-01-01
      • 1970-01-01
      • 2010-11-30
      • 2017-06-04
      • 1970-01-01
      • 2021-07-22
      • 1970-01-01
      相关资源
      最近更新 更多