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:
-
<%@ Page Language="vb" Codebehind="test_iframe_page.aspx.vb" %>
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
<HTML>
-
<HEAD>
-
<title>test_iframe_page</title>
-
</HEAD>
-
<body >
-
<form id="test_iframe_page" name="test_iframe_page" method="post"
-
runat="server">
-
<p>This is the test_iframe_page</p>
-
<A href="test_page2.aspx" target="iframe"><b>REFRESH IFRAME WITH
-
TEST PAGE 2</b></A>
-
<br /><br />
-
<A href="test_page.aspx" target="iframe"><b>REFRESH IFRAME WITH
-
TEST PAGE 1</b></A>
-
<br /><br />
-
<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center"
-
border="0" height="100%">
-
<tr>
-
<td align="center" width="100%">
-
<iframe id="iframe1" name="iframe" marginWidth="0" marginHeight="0"
-
src="test_page.aspx"
-
frameBorder="yes" width="100%" scrolling="auto" height="100%">
-
</iframe>
-
</td>
-
</tr>
-
</TABLE>
-
</form>
-
</body>
-
-
</HTML>
-
-
Load pages:
-
-
<%@ Page Language="vb" Codebehind="test_page.aspx.vb" %>
-
<HTML>
-
<HEAD>
-
<title>test_page</title>
-
</HEAD>
-
<body>
-
<form id="Form1">
-
<p>Hello world this is test_page!</p>
-
</form>
-
</body>
-
</HTML>
-
-
<%@ Page Language="vb" Codebehind="test_page2.aspx.vb" %>
-
<HTML>
-
<HEAD>
-
<title>test_page2</title>
-
</HEAD>
-
<body>
-
<form id="Form1">
-
<p>Hello world this is test_page2!</p>
-
</form>
-
</body>
-
</HTML>