views:

419

answers:

4

I'm trying to use an 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 impossibe is it another way to show aspx pages withing another html page?

Thnx**

+3  A: 

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 ...

anthares
+1  A: 

A request for an .aspx page is no different from a request for an HTML file. Either your asp page is not rendering properly (possibly a server error?) or else your iframe is not pointing to it correctly.

I do notice that you have a badly formatted src tag for the .aspx page..

src="SimpleTarget.aspx"height="100%"

should be

src="SimpleTarget.aspx" height="100%"
womp
+1  A: 

Is this bit a typo? if not it could be your problem

src="SimpleTarget.aspx"height="100%"

should be

src="SimpleTarget.aspx" height="100%"

This is also a typo (but would not break your rendering.

<iframe id="myIframe" src="HTMLPage1.htm" 100%" width="100%">

should be

<iframe id="myIframe" src="HTMLPage1.htm" height="100%" width="100%">
rockinthesixstring
oh man im sorry it was a copy paste mistake you are right.. Look the original post it is corrected
Carlos Castillo
are you still having the same issue with the corrected syntax? If so, have you loaded the ASPX page on it's own to make sure it loads? If it does not load. Why?
rockinthesixstring
A: 

In firefox you can right click in th iframe and get an iframe menu and choose to open the frame in a new tab - this will confirm the actual url being used by the browser for the iframe and as others have stated allow you to ensure the aspx page does render correctly.

Symeon