iframe与aspx页面,使页面停止渲染 [英] iframe with aspx page makes page stop rendering

查看:178
本文介绍了iframe与aspx页面,使页面停止渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的索引页面中的iframe中。这的iFrame包含一个aspx页面里面它的形式,与 RUNAT =服务器

I have an iFrame inside my index page. This iFrame contains an aspx page with a form inside it, with runat=server.

对于一些奇怪的原因,什么我加的iFrame没有被呈现到页面后。

For some weird reason, anything I add after the iFrame is not being rendered to the page.

我尝试添加文本​​,DIV,被添加什么,当我运行页面后。

I tried adding text, a div, nothing is being added after when I run the page.

code:

<body>

        <asp:Panel ID="Panel1" runat="server" Height="80px">
        <iframe name="LogoFrame" id="LogoFrame" src="asp/Logo.aspx" 
            scrolling="no" 
            style="border-style: hidden; padding: 0px; margin: 00px; width: 100%; height: 100%" 
            width="100%"/>
        </asp:Panel>

        <form id="MainMenu" method="post" runat="server">

        <asp:Panel ID="Panel2" runat="server" Height="38px">

            <table class="tableMenu" id="MainTable" style="BACKGROUND-COLOR: #e2eded" cellSpacing="0"
                cellPadding="0" width="100%" border="0">
                <tr class="trMenu2" vAlign="middle">

        // Some other things below, including the closing of Panel2 and MainMenu form

当我运行和检查网页...

When I run and inspect the page...

在这里输入的形象描述

如果我删除的iFrame,该页面的其余部分正确呈现。结果
与什么呢?

If I remove the iFrame, the rest of the page renders properly.
What is up with that?

推荐答案

我怀疑这是因为iframe标签是自闭和iframe中不应该是自闭。如果更换 /&GT; &GT;&LT; / IFRAME&GT; ',我认为应该解决问题

I suspect it's because the iframe tag is self-closing and iframes should not be self-closing. If you replace ' />' with '></iframe>', I think that should resolve the problem.

这篇关于iframe与aspx页面,使页面停止渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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