473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

asp.net 1.1 page and controls life-cycle

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
Jan 20 '06 #1
5 1833
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Fred" <fr**@ilovespam.com> wrote in message
news:uF**************@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

Jan 20 '06 #2
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

Jan 20 '06 #3
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
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Fred" <fr**@ilovespam.com> wrote in message
news:ua**************@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

Jan 20 '06 #4
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

Jan 20 '06 #5
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Fred" <fr**@ilovespam.com> wrote in message
news:eC**************@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

Jan 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: anon | last post by:
Post Forwarding question...... For this control below, <asp:Button runat="server" PostTargetUrl="page2.aspx" /> The Attribute: PostTargetUrl="page2.aspx" Is this PostTargetUrl Attribute...
1
by: Ole Hanson | last post by:
Hi I am having a number of User Controls (ascx) on my page (aspx). The page is in my scenario only working as a dumb "container "giving life to the Controls, as these are handling my UI-logic...
5
by: Simon Harvey | last post by:
Hi there everyone, I have a fairly open ended but simple question that I could really use some assistance with. When I first bought visual studio (under the student license) i thought it was...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
1
by: mato | last post by:
this is what i experienced in my web application and i realy do not understand. this is my web page class behind public class MyWebPage : System.Web.UI.Page { //some page controls ..... ...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
5
by: Stewart | last post by:
Hi All, Hoping someone has done something like this in the past. I'm trying to work out the best way to add an RTF control to my web page and save it's contents as html back to a database. ...
3
by: thedebugger | last post by:
Dear Friends, I am working on website application in c# with asp.net. My practice using aspx files is, I have 1 main aspx files for inside pages. Whenever user hit the button like aboutus,...
3
by: Tome73 | last post by:
Could someone give me a comprehensive order of events as they pertain to web controls within a page. The page events are: Page_Init Page_Load Page_PreRender Page_Unload Page_Disposed So...
58
by: Don Li | last post by:
I've tried <body style="font-family:Verdana,Arial,Helvetica;font-size:0.8em;"> or <body style="font-family:Verdana,Arial,Helvetica;font-size:11pct;"> or <body...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.