I’m trying to use an <iframe> to point to an .aspx file, but when I load it I keep getting an empty frame, no matter what is in the target .aspx nothing gets displayed. Here the html:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
This is the principal page</div>
<iframe id="myIframe" src="SimpleTarget.aspx" height="100%" width="100%"></iframe>
</form>
</body>
</html>
Then I tried it pointing to an html and it was succesfully rendered in the browser showing the html content. Here the html:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
This is the principal page</div>
<iframe id="myIframe" src="HTMLPage1.htm" height="100%" width="100%"></iframe>
</form>
</body>
</html>
So my question is, am I missing something when defining the iframe or is completely impossible to point to an .aspx with an iframe?
In case it is impossible, is there another way to show aspx pages within another html page?
It should work with SimpleTarget.aspx just make sure that the relative path is correct and the page is loaded when you hit it with the browser …