When does Page Load happen?

Discussion in 'ASP .Net' started by Ross, Nov 5, 2003.

  1. Ross

    Ross Guest

    I have an aspx page containing two IFrames, each of which
    contain aspx pages. The mother page has a dataset filled
    with a single call to my Oracle database. This dataset has
    three tables. The mother page uses data from table1; the
    first child page uses data from table2 and table3; the
    last child page uses table3 only.
    So the mother page's Page_Load fills the dataset and binds
    to some controls. The child pages will use their Page_Load
    methods to call a method on the mother page (getDataSet)
    to obtain the data they need from the mother dataset.
    Question: Does the Page_Load on the mother page finish
    before the Page_Load on the children begin? Otherwise, the
    call to getDataSet may throw some funky errors.
     
    Ross, Nov 5, 2003
    #1
    1. Advertising

  2. Ross

    AW Guest

    You have no guarantee at all on the order. In fact, it will depend on the
    client's browser because it is the one that will issue the requests for the
    two pages in the order that it wants.

    In your case, I suggest that you use a call to the same method in the two
    pages. The method will:
    -load the data from the database and place it in the cache if it's not in
    the cache, then return it
    -return the data from the cache if it's already in.

    That way you will have the same optimized effect without any dependence on
    the order.
    --
    To reply, remove a "l" before the @ sign.

    Arnaud Weil - MCT, MCSD.Net, MCAD.Net
     
    AW, Nov 5, 2003
    #2
    1. Advertising

  3. Ross

    charles Guest

    Yes... the Mother page's page load finishes and serves everything to the
    browser and then the browser figures out the that there are IFrames and
    generates additional requests for those content pages.

    However, I don't believe that GetDataSet will work because the requests for
    the IFrame pages are entirely independent requests and the server doesn't
    know they are related to the mother page. Instead, you'll have to stash the
    dataset in a session variable or some other more global storage.

    charles


    "Ross" <> wrote in message
    news:0efb01c3a3b8$8433e7d0$...
    > I have an aspx page containing two IFrames, each of which
    > contain aspx pages. The mother page has a dataset filled
    > with a single call to my Oracle database. This dataset has
    > three tables. The mother page uses data from table1; the
    > first child page uses data from table2 and table3; the
    > last child page uses table3 only.
    > So the mother page's Page_Load fills the dataset and binds
    > to some controls. The child pages will use their Page_Load
    > methods to call a method on the mother page (getDataSet)
    > to obtain the data they need from the mother dataset.
    > Question: Does the Page_Load on the mother page finish
    > before the Page_Load on the children begin? Otherwise, the
    > call to getDataSet may throw some funky errors.
     
    charles, Nov 5, 2003
    #3
  4. > Question: Does the Page_Load on the mother page finish
    > before the Page_Load on the children begin? Otherwise, the
    > call to getDataSet may throw some funky errors.


    These are asynchronous, unrelated HTTP requests, so there is no way to have
    anything depend on when the Page_Load Sub of any of these pages will fire.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    Big Things are made up of
    Lots of Little Things.

    "Ross" <> wrote in message
    news:0efb01c3a3b8$8433e7d0$...
    > I have an aspx page containing two IFrames, each of which
    > contain aspx pages. The mother page has a dataset filled
    > with a single call to my Oracle database. This dataset has
    > three tables. The mother page uses data from table1; the
    > first child page uses data from table2 and table3; the
    > last child page uses table3 only.
    > So the mother page's Page_Load fills the dataset and binds
    > to some controls. The child pages will use their Page_Load
    > methods to call a method on the mother page (getDataSet)
    > to obtain the data they need from the mother dataset.
    > Question: Does the Page_Load on the mother page finish
    > before the Page_Load on the children begin? Otherwise, the
    > call to getDataSet may throw some funky errors.
     
    Kevin Spencer, Nov 5, 2003
    #4
    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. Emilio

    MSFT Why does this happen?

    Emilio, Oct 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    351
    Alvin Bruney
    Oct 30, 2003
  2. Jeremy Watts

    why does this happen?

    Jeremy Watts, Aug 11, 2005, in forum: Java
    Replies:
    4
    Views:
    373
    Roedy Green
    Aug 11, 2005
  3. Steven T. Hatton
    Replies:
    5
    Views:
    705
    Salt_Peter
    Nov 20, 2006
  4. , India
    Replies:
    1
    Views:
    329
    , India
    Apr 21, 2008
  5. Ken Williams

    why does this happen?

    Ken Williams, Sep 5, 2008, in forum: HTML
    Replies:
    16
    Views:
    672
    Roy A.
    Sep 7, 2008
Loading...

Share This Page