Reputation: 14982
I have an iFrame inside my index page. This iFrame contains an aspx page with a form inside it, with runat=server
.
For some weird reason, anything I add after the iFrame is not being rendered to the page.
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...
If I remove the iFrame, the rest of the page renders properly.
What is up with that?
Upvotes: 0
Views: 582
Reputation: 608
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.
Upvotes: 3
Reputation: 808
Seems like the iframe is out of the form
tag. But you put the iframe inside a Panel, which is an asp.net tool. You can try Removing the panel, or moving the code inside the form tags.
Upvotes: 0