No Page_Load event when loading .aspx page into iframe

Discussion in 'ASP .Net' started by =?Utf-8?B?ZXBvd2Vy?=, Oct 10, 2007.

  1. 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_page.aspx.vb" %>
    <HTML>
    <HEAD>
    <title>test_page2</title>
    </HEAD>
    <body>
    <form id="Form1">
    <p>Hello world this is test_page2!</p>
    </form>
    </body>
    </HTML>
    =?Utf-8?B?ZXBvd2Vy?=, Oct 10, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?ZXBvd2Vy?=

    IfThenElse Guest

    So you put a break point in the page_load event handler and you are in debug
    mode not release mode and still can not get a hit on the break point?


    "epower" <> wrote in message
    news:...
    > 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_page.aspx.vb" %>
    > <HTML>
    > <HEAD>
    > <title>test_page2</title>
    > </HEAD>
    > <body>
    > <form id="Form1">
    > <p>Hello world this is test_page2!</p>
    > </form>
    > </body>
    > </HTML>
    >
    >
    >
    IfThenElse, Oct 10, 2007
    #2
    1. Advertising

  3. Thank you for your reply.

    Yes - that is correct. And I also put in a response.write() statement in
    the page_load event as well, just in case the breakpoint wasn't working for
    some reason!

    "IfThenElse" wrote:

    > So you put a break point in the page_load event handler and you are in debug
    > mode not release mode and still can not get a hit on the break point?
    >
    >
    > "epower" <> wrote in message
    > news:...
    > > 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_page.aspx.vb" %>
    > > <HTML>
    > > <HEAD>
    > > <title>test_page2</title>
    > > </HEAD>
    > > <body>
    > > <form id="Form1">
    > > <p>Hello world this is test_page2!</p>
    > > </form>
    > > </body>
    > > </HTML>
    > >
    > >
    > >

    >
    >
    >
    =?Utf-8?B?ZXBvd2Vy?=, Oct 10, 2007
    #3
  4. =?Utf-8?B?ZXBvd2Vy?=

    bruce barker Guest

    the browser will cache the pages so request is made. set the caching
    policy on the pages.

    -- bruce (sqlwork.com)

    epower wrote:
    > 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_page.aspx.vb" %>
    > <HTML>
    > <HEAD>
    > <title>test_page2</title>
    > </HEAD>
    > <body>
    > <form id="Form1">
    > <p>Hello world this is test_page2!</p>
    > </form>
    > </body>
    > </HTML>
    >
    >
    >
    bruce barker, Oct 10, 2007
    #4
  5. Thanks for the suggestion.

    I tried disabling caching on the main page with the iframe as well as the
    two test pages, but this had no effect. I am still not getting the page_load
    event.

    I disabled caching in two ways on the pages, by adding this statement under
    the page directive:
    <%@ OutputCache Location="None" %>

    and by adding these statements to the <head> area:
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Pragma" content="no-cache">


    "bruce barker" wrote:

    > the browser will cache the pages so request is made. set the caching
    > policy on the pages.
    >
    > -- bruce (sqlwork.com)
    >
    > epower wrote:
    > > 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_page.aspx.vb" %>
    > > <HTML>
    > > <HEAD>
    > > <title>test_page2</title>
    > > </HEAD>
    > > <body>
    > > <form id="Form1">
    > > <p>Hello world this is test_page2!</p>
    > > </form>
    > > </body>
    > > </HTML>
    > >
    > >
    > >

    >
    =?Utf-8?B?ZXBvd2Vy?=, Oct 10, 2007
    #5
  6. Thanks for all your help but I finally stumbled on a solution - I have no
    idea why it works though!

    In the page directive for the pages that are being loaded into the iframe, I
    replaced

    Codebehind="test_page.aspx.vb"

    with

    CodeFile="test_page.aspx.vb" Inherits="test_page"

    Hope this helps someone else!

    "epower" wrote:

    > 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_page.aspx.vb" %>
    > <HTML>
    > <HEAD>
    > <title>test_page2</title>
    > </HEAD>
    > <body>
    > <form id="Form1">
    > <p>Hello world this is test_page2!</p>
    > </form>
    > </body>
    > </HTML>
    >
    >
    >
    =?Utf-8?B?ZXBvd2Vy?=, Oct 10, 2007
    #6
  7. =?Utf-8?B?ZXBvd2Vy?=

    IfThenElse Guest

    see this link http://www.ddj.com/windows/187202007


    CodeFile is for stock projects and CodeBehind for WAP and it affects how
    ASP.NET compiles the page as you probably know.
    The issue with CodeFile is that the code is compiled into it's own (or
    directory level assembly) and so the type may not be available to another
    page unless the control is @Registered. If you dynamically load you pretty
    much can't reference the ASCX codebehind class.

    With WAP everything goes into a single assembly so you can reference the
    codebehind class from just about anywhere...

    The thing is that if you forget to set the proper format for WAP code the
    page/control will still work because ASP.NET internally doesn't care whether
    a project is stock or WAP so the page/control runs just fine with CodeFile.



    CodeFile is used for the Web Site project type that shipped with VS.Net
    2005. The Web Application Project changed this back to the original
    CodeBehind used in VS 2002 and 2003 Web Application Projects.

    the migration tool for going from Web Site to WAP doesn't make this change
    for you, unfortunately. Hence these lingering issues.





    "epower" <> wrote in message
    news:...
    > Thanks for all your help but I finally stumbled on a solution - I have no
    > idea why it works though!
    >
    > In the page directive for the pages that are being loaded into the iframe,
    > I
    > replaced
    >
    > Codebehind="test_page.aspx.vb"
    >
    > with
    >
    > CodeFile="test_page.aspx.vb" Inherits="test_page"
    >
    > Hope this helps someone else!
    >
    > "epower" wrote:
    >
    >> 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_page.aspx.vb" %>
    >> <HTML>
    >> <HEAD>
    >> <title>test_page2</title>
    >> </HEAD>
    >> <body>
    >> <form id="Form1">
    >> <p>Hello world this is test_page2!</p>
    >> </form>
    >> </body>
    >> </HTML>
    >>
    >>
    >>
    IfThenElse, Oct 11, 2007
    #7
  8. Thank you for your help. I appreciate all of the quick replies - and will
    use this forum again!

    "IfThenElse" wrote:

    > see this link http://www.ddj.com/windows/187202007
    >
    >
    > CodeFile is for stock projects and CodeBehind for WAP and it affects how
    > ASP.NET compiles the page as you probably know.
    > The issue with CodeFile is that the code is compiled into it's own (or
    > directory level assembly) and so the type may not be available to another
    > page unless the control is @Registered. If you dynamically load you pretty
    > much can't reference the ASCX codebehind class.
    >
    > With WAP everything goes into a single assembly so you can reference the
    > codebehind class from just about anywhere...
    >
    > The thing is that if you forget to set the proper format for WAP code the
    > page/control will still work because ASP.NET internally doesn't care whether
    > a project is stock or WAP so the page/control runs just fine with CodeFile.
    >
    >
    >
    > CodeFile is used for the Web Site project type that shipped with VS.Net
    > 2005. The Web Application Project changed this back to the original
    > CodeBehind used in VS 2002 and 2003 Web Application Projects.
    >
    > the migration tool for going from Web Site to WAP doesn't make this change
    > for you, unfortunately. Hence these lingering issues.
    >
    >
    >
    >
    >
    > "epower" <> wrote in message
    > news:...
    > > Thanks for all your help but I finally stumbled on a solution - I have no
    > > idea why it works though!
    > >
    > > In the page directive for the pages that are being loaded into the iframe,
    > > I
    > > replaced
    > >
    > > Codebehind="test_page.aspx.vb"
    > >
    > > with
    > >
    > > CodeFile="test_page.aspx.vb" Inherits="test_page"
    > >
    > > Hope this helps someone else!
    > >
    > > "epower" wrote:
    > >
    > >> 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_page.aspx.vb" %>
    > >> <HTML>
    > >> <HEAD>
    > >> <title>test_page2</title>
    > >> </HEAD>
    > >> <body>
    > >> <form id="Form1">
    > >> <p>Hello world this is test_page2!</p>
    > >> </form>
    > >> </body>
    > >> </HTML>
    > >>
    > >>
    > >>

    >
    >
    >
    =?Utf-8?B?ZXBvd2Vy?=, Oct 11, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stevie_mac
    Replies:
    3
    Views:
    2,958
    Stevie_mac
    Aug 12, 2003
  2. Christopher Ambler

    Re: loading a html page into a aspx page

    Christopher Ambler, Aug 28, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    1,123
    John Saunders
    Aug 28, 2003
  3. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    538
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  4. rockdale
    Replies:
    1
    Views:
    648
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Nov 16, 2006
  5. Paul
    Replies:
    3
    Views:
    131
Loading...

Share This Page