473,473 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

No Page_Load event when loading .aspx page into iframe

2 New Member
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
1 3429
jhardman
3,406 Recognized Expert Specialist
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

3
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...
2
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...
2
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...
14
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) {...
10
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...
7
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....
1
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...
17
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...
11
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.