Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > When does Page Load happen?

Reply
Thread Tools

When does Page Load happen?

 
 
Ross
Guest
Posts: n/a
 
      11-05-2003
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.
 
Reply With Quote
 
 
 
 
AW
Guest
Posts: n/a
 
      11-05-2003
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


 
Reply With Quote
 
 
 
 
charles
Guest
Posts: n/a
 
      11-05-2003
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" <(E-Mail Removed)> wrote in message
news:0efb01c3a3b8$8433e7d0$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      11-05-2003
> 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" <(E-Mail Removed)> wrote in message
news:0efb01c3a3b8$8433e7d0$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Javascript function upon Page Load from Page Load event handle Matcon ASP .Net 3 05-28-2008 05:15 PM
What does "Page Load" and "Page Unload", "Page Life Cycle" exactlymean???? lander ASP .Net 5 03-03-2008 02:06 PM
.NET 2.0 ASPx Page does not load, but HTM does prabhupr@hotmail.com ASP .Net 1 02-08-2006 12:57 PM
Page load of the parent page called twice when a modal dialog is opened from a button click of the user control on the parent page Samy ASP .Net 2 08-15-2005 03:30 PM
Page Load and webcontrol page load venky ASP .Net 5 07-11-2005 03:16 PM



Advertisments