The Page_Load of your aspx page should execute before the Page_Load of any
of your usercontrols. I would think that you can do your database work
there, populate some objects, and then pass those to the UserControls to
update them.
Just make sure to create some properties (which accept the object) or
methods (which accept the object or individual params) in your UserControl,
and have them call a UserControl-internal Render () method that updates the
UC's UI.
/// M
"Sammy" <sa***@picostat ion.com> wrote in message
news:uE******** ******@TK2MSFTN GP15.phx.gbl...
When a user control access SQL Server, what happens if I host it multiple
times on one webpage (create several instances of that user control), in
terms of trips being made to the server? How can I make sure a page calls
the server only once, and gets all information required by all user
controls? This applies to a case where user controls are not even the
same, that is, multiple user controls that each access the database using a
different SQL statement/etc.
Thank you,
Sammy