我想在单击更新面板内的按钮时返回页面。我附上我的代码。我想要回发的按钮是 btnUpdate。我的目标是当模态弹出框内的操作完成时,要更新模态弹出框外的gridview。主要问题是我在同一个模式弹出窗口中有多个内容占位符,我想异步运行。
<asp:Panel ID="Panel1" runat="server"></asp:Panel>
<asp:Button ID="btnShowPopup" runat="server" style="display:none" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" PopupDragHandleControlID="Panel1" RepositionMode="None" runat="server" PopupControlID="pnlpopup"
TargetControlID="btnShowPopup" CancelControlID="btnCancel"
DropShadow="true"
BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>
<asp:Panel ID="pnlpopup" runat="server" BackColor="LightGray" style="display: none"
CssClass="modalPopup" Width="650px" >
<asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:PlaceHolder ID="PlaceHolder1" Visible="false" runat="server">
<asp:Button ID="btnUpdate" ValidationGroup="r" runat="server" Height="30px" Width="160px" CommandName="Update"
OnClick="btnUpdate_Click" Text="Save"
Visible="False" />
<asp:Button ID="Button5" runat="server" ValidationGroup="r" Height="30px" Width="160px" onclick="Button5_Click" Text="Save"
Visible="False" />
</asp:PlaceHolder>
<asp:PlaceHolder ID="PlaceHolder2" Visible="false" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btn1" ValidationGroup="a" runat="server" Height="30px" Width="160px" CommandName="Update"
OnClick="btn1_Click" Text="Save"
Visible="False" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:PlaceHolder>