我如何prevent模式弹出窗口(ModalPopupExtender)的回发闭幕? [英] How do I prevent the closing of modal popup window(ModalPopupExtender) on postback?

查看:228
本文介绍了我如何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

这篇关于我如何prevent模式弹出窗口(ModalPopupExtender)的回发闭幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆