【问题标题】:on postback avoid iframe getting refreshed in asp.net在回发时避免 iframe 在 asp.net 中刷新
【发布时间】:2013-07-10 11:16:06
【问题描述】:

我在我的页面中使用了 iframe。

对于 iframe 的每个回发事件内容都会刷新。

我不想在 eace postbackevent 上刷新 iframe 的内容,iframe 只能在页面加载时调用(!ispostback)。

我的 iframe 中有一个很大的计算,所以如果每次父页面的(主页)回发事件都加载它,那么使用 iframe 是没有用的。

所以请在这个问题上帮助我。

【问题讨论】:

    标签: asp.net iframe


    【解决方案1】:

    使用更新面板

    <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Always">
        <ContentTemplate>
            content that only you want to postback
        </ContentTemplate>
    </asp:UpdatePanel>
    

    引用http://msdn.microsoft.com/en-IN/library/system.web.ui.updatepanel%28v=vs.100%29.aspx

    【讨论】:

    • 实际上,对于每个 IsPostback 事件,Iframe 也越来越令人耳目一新。如果我在父页面中执行任何单击事件,则此 iframe 不应获得 refresg。我不想刷新 IFrame 中的页面。
    猜你喜欢
    • 2012-04-04
    • 1970-01-01
    • 2013-10-03
    • 1970-01-01
    • 2016-04-15
    • 1970-01-01
    • 2014-11-09
    • 1970-01-01
    • 2020-02-12
    相关资源
    最近更新 更多