我如何prevent模式弹出窗口(ModalPopupExtender)的回发闭幕?
问题描述:
我使用的是微软AjaxControlToolkit模态弹出窗口。
I'm using Microsoft AjaxControlToolkit for modal popup window.
和一个模式弹出窗口上,回发发生时,窗口收盘时。我如何prevent从模式弹出的闭合动作?
And on a modal popup window, when a postback occurred, the window was closing. How do I prevent from the closing action of the modal popup?
答
把你控制更新面板内。请参阅我的样品code,pnlControls是认为将弹出显示控制控制方式:
Put you controls inside the update panel. Please see my sample code, pnlControls is control that holds controls that will be displayed on popup:
<asp:Panel ID="pnlControls" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="TestButton" runat="server" Text="Test Button" onclick="TestButton_Click" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
这将做的工作适合你:)
This will do the job for you :)
最好的问候,
格雷戈尔PRIMAR
Best regards, Gregor Primar