467,915 Members | 1,517 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

No Page_Load event when loading .aspx page into iframe

Hello,

I am working on an ASP .NET application in Visual Studio 2005 and running
IE7.

This application has a page that contains an iframe which loads an .aspx
page and hyperlinks that load the iframe with different .aspx pages. The
HTML/mark up for the .aspx pages executes every time, but the Page_Load
events for the pages never run (on initial load or subsequent loads).

All of my research so far indicates that the page_load event should occur
and I have seen a version of this application (developed in framework 1.1)
work on another server which was running IE6. Is there a difference here with
previous versions of ASP .NET or IE that anyone knows about?

I have developed a very simple set of test pages that recreate the problem,
and am including the code below.

Thank you in advance for any help!

-----------------------------------
Page with IFRAME:
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="vb" Codebehind="test_iframe_page.aspx.vb" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  3. <HTML>
  4.     <HEAD>
  5.         <title>test_iframe_page</title>
  6.     </HEAD>
  7.     <body >
  8.         <form id="test_iframe_page" name="test_iframe_page" method="post" 
  9. runat="server">
  10.             <p>This is the test_iframe_page</p>
  11.             <A href="test_page2.aspx" target="iframe"><b>REFRESH IFRAME WITH 
  12. TEST PAGE 2</b></A>
  13.             <br /><br />
  14.             <A href="test_page.aspx" target="iframe"><b>REFRESH IFRAME WITH 
  15. TEST PAGE 1</b></A>
  16.             <br /><br />
  17.             <TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" 
  18. border="0" height="100%">
  19.                 <tr>
  20.                     <td align="center" width="100%">
  21.                         <iframe id="iframe1" name="iframe" marginWidth="0" marginHeight="0" 
  22. src="test_page.aspx"
  23.                             frameBorder="yes" width="100%" scrolling="auto" height="100%">
  24.                         </iframe>
  25.                     </td>
  26.                 </tr>
  27.             </TABLE>
  28.         </form>
  29.     </body>
  30.  
  31. </HTML>
  32.  
  33. Load pages:
  34.  
  35. <%@ Page Language="vb" Codebehind="test_page.aspx.vb" %>
  36. <HTML>
  37.     <HEAD>
  38.         <title>test_page</title>
  39.     </HEAD>
  40.     <body>
  41.         <form id="Form1">
  42.             <p>Hello world this is test_page!</p>
  43.         </form>
  44.     </body>
  45. </HTML>
  46.  
  47. <%@ Page Language="vb" Codebehind="test_page2.aspx.vb" %>
  48. <HTML>
  49.     <HEAD>
  50.         <title>test_page2</title>
  51.     </HEAD>
  52.     <body>
  53.         <form id="Form1">
  54.             <p>Hello world this is test_page2!</p>
  55.         </form>
  56.     </body>
  57. </HTML>
Oct 10 '07 #1
  • viewed: 3096
Share:
1 Reply
jhardman
Expert 2GB
Moved to .NET forum. Please note that ASP.NET is just a part of .NET, whereas ASP is an older technology.

Also, please put your code within [code] goes here [/code] tags
Oct 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Stevie_mac | last post: by
2 posts views Thread by Jeronimo Bertran | last post: by
2 posts views Thread by magister | last post: by
14 posts views Thread by V. Jenks | last post: by
10 posts views Thread by Andrew | last post: by
1 post views Thread by puja | last post: by
17 posts views Thread by Arpan | last post: by
11 posts views Thread by fiefie.niles | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.