asp.net 1.1 page and controls life-cycle

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

hi, i have a page written by someone else w/ a few user controls inside
it(w/ user controls inside em too) - what i dont get is the order
different page_inits, page_loads, cashed and postback events and code
inside <% %> are executing

can u plz point me to a specification or some other description of the
whole process

TIA
 
tnx for this info, Karl

but what happens when u have controls inside page, when are their events
processed, code inside .aspx pages and <%= %> tag, dynamicly added controls
 
Events are recursive. If Page_Load fires in the page, then in the child
control, then in controls within the control.

<%= %> happens sometime after prerender

dynamically added controls play catch up when they are added to the page. If
they are added in Init, then init will fire. if they are added during
page_load, then init and page_load will fire...


Karl
 
great, IMHO you should write an article w/ this information

one last detail when are 'script runat=server' blocks in .aspx pages
executed - again after PreRender ?
 
Well, if I recall, you can't just do:

<script runat="server">
Response.Write("aa");
</script>

ur runat="server" needs to have hooks into the actual methods. so the
<script runat="server"> Page_Load</script> is the same event as the
codebehind one.

Karl
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top