Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > order of usercontrols processed by events of page

Reply
Thread Tools

order of usercontrols processed by events of page

 
 
Gokhan Akca
Guest
Posts: n/a
 
      05-30-2005
I have a page containing multiple user controls.
When Page_OnPreRender is called, the user controls' OnPreRender Method is
called, too.

But: How is the order of the usercontrols processed by asp.net? Note that I
have multiple user controls - not just one.
Assumption: the framework is accessing the page's controls list.

If the assumption is correct:
How can I affect the order of user controls stored in the page's controls
list?

Does the tag prefix registration within a page affect the order of the
controls in the control's list?
Or does the page parse the controls which it contains and adds them one by
one in order of occurence within the HTML tags?


Please note:
I am not interested in simple page lifecycle. I am already familiar with
page lifecycle. I need some information on how I can affect the order of web
user controls within a page processed by asp.net events.

Thanks.
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-30-2005
> How can I affect the order of user controls stored in the page's
> controls list?


The order they're in the list is the ordered they're rendered on the page.
Changing this order will affect the layout of your page (unless you're using
absolute positioning).

> I need some information on how I can affect the order
> of web user controls within a page processed by asp.net events.


If there's something critical you need to do on the controls in a particular
order, I'd suggest writing code at the page level that finds all of your
custom controls in the controls collection and then calls to them in whatever
order you're looking for.

-Brock
DevelopMentor
http://staff.develop.com/ballen





 
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
Web Service Requests Processed Out of Order mgdev ASP .Net Web Services 7 02-19-2007 07:24 PM
Order of events, databinding, and UserControls Nathan Sokalski ASP .Net Datagrid Control 8 05-23-2006 04:32 PM
Order of events, databinding, and UserControls Nathan Sokalski ASP .Net 9 05-23-2006 04:32 PM
Order of events, databinding, and UserControls Nathan Sokalski ASP .Net Web Controls 8 05-23-2006 04:32 PM
How can I reset my directory to view digital images in the order taken, not processed? M. Souris Digital Photography 3 08-11-2003 07:14 PM



Advertisments