472,978 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 software developers and data experts.

No Page_Load event when loading .aspx page into iframe


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

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>
  31. </HTML>
  33. Load pages:
  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>
  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
1 3400
3,406 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

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

Similar topics

by: Stevie_mac | last post by:
It might be me but... I dont seem to get a Page_Load event when a opening an ASPX in an iFrame. I do geta Page_Load event when an item on the ASPX (inside the iFrame) is clicked but then...
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
by: magister | last post by:
Hello I have a default.aspx page with which has an iframe. In the code-behind of the default.aspx page it loads the 'src' attribute of the iframe. The iframe loads another aspx page, but...
by: V. Jenks | last post by:
I'm a little rusty having not touched .NET for 6 months and I can't remember why Page_Load is happening twice in this code: private void Page_Load(object sender, System.EventArgs e) {...
by: Andrew | last post by:
Hi, I have a messagebox that pops up due to an event. I did it in javascript. ie. alert("Time's up. Assessment Ended"); I want to capture the OK and Cancel events of this alert messagebox. My...
by: Oleg | last post by:
I have a web form let's say 'YYZ.aspx'. It has an iframe in it. When it loads it shows progress bar in IE this way: loading for page then again loading for page in iframe. This part is fine....
by: puja | last post by:
hi all, I have this .aspx page for which the Page_load event occurs twice. I found out while debugging. After searching google, I tried checking with Page.Ispostback method and also had...
by: Arpan | last post by:
When a Button is clicked in a Web Form in an ASPX page, the Form will post back to itself. Under such circumstances (i.e. when a Button is clicked), will the Page_Load sub execute first & then will...
by: fiefie.niles | last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a sub mySub that does not do anything (for testing purposes). But, Page_Load gets called twice. On every single ASPX page in my...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.