こんにちは私はポップアップである1つのユーザーコントロールを作成しました、それは絶対にうまく機能しています、しかし私が閉じるボタン以外の他のボタンをクリックするとそれは閉じられます。
これが私のコードです、
<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ページ)からイベントをクリックします。
誰でも助けることができます