|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
asp.net 1.1 page and controls life-cyclehi, 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
http://aspalliance.com/articleViewer.aspx?aId=134&pId=
init load viewstate (if postback) Process posted data (if postback) Page Load Process posted data again (if postback, necessary incase things changed in page_load) Raise events (if postback) Prerender Save viewstate Unload Karl Show quote "Fred" <fred@ilovespam.com> wrote in message news:uFMBaYcHGHA.2064@TK2MSFTNGP09.phx.gbl... > 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 Karl Seguin [MVP] wrote: Show quote > http://aspalliance.com/articleViewer.aspx?aId=134&pId= > > init > load viewstate (if postback) > Process posted data (if postback) > Page Load > Process posted data again (if postback, necessary incase things changed in > page_load) > Raise events (if postback) > Prerender > Save viewstate > Unload > > Karl > 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 Show quote "Fred" <fred@ilovespam.com> wrote in message news:uabTeLeHGHA.2896@TK2MSFTNGP09.phx.gbl... > 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 > > Karl Seguin [MVP] wrote: >> http://aspalliance.com/articleViewer.aspx?aId=134&pId= >> >> init >> load viewstate (if postback) >> Process posted data (if postback) >> Page Load >> Process posted data again (if postback, necessary incase things changed >> in page_load) >> Raise events (if postback) >> Prerender >> Save viewstate >> Unload >> >> 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 ? Karl Seguin [MVP] wrote: Show quote > 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 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 Show quote "Fred" <fred@ilovespam.com> wrote in message news:eC0mF4fHGHA.2836@TK2MSFTNGP14.phx.gbl... > 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 ? > > Karl Seguin [MVP] wrote: >> 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 |
|||||||||||||||||||||||