What happens after runtime?

R

rn5a

The different Page events in the page life cycle like Page_PreInit,
Page_Init, Page_Load etc. - are they different stages of the runtime
process?

Does a server send back the HTML output of an ASPX page to the browser
immediately after the runtime or are there any processes involved in
between the runtime & the time when the server sends the HTML output
back to the browser?

Thanks
 
M

Mark Fitzpatrick

The PreInit, Init, Load are all events that are raised at different times
during the processing of a page. The output to HTML usuually happens, I
believe, during the Render event. You should be able to google for a some
good information on the page event hierarchy. User controls will also have a
similar hierarchy though they won't have all events. Knowing which events
fire at which times is very useful, especially when trying to communicate
between pages and user controls since passing information between controls
and a page can be a tricky matter of timing.
 
R

rn5a

The PreInit, Init, Load are all events that are raised at different times
during the processing of a page. The output to HTML usuually happens, I
believe, during the Render event. You should be able to google for a some
good information on the page event hierarchy. User controls will also have a
similar hierarchy though they won't have all events. Knowing which events
fire at which times is very useful, especially when trying to communicate
between pages and user controls since passing information between controls
and a page can be a tricky matter of timing.

--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage








- Show quoted text -

Thanks Mark for the response. Actually I am aware of the various
events that are raised when a request (new or postback) is made to a
server. What I would like to know is the time during which these
events fire - is that time known as the runtime?

For e.g. in late binding, variables that are of type "Objects" are not
processed until runtime. Hence one can use them to represent any type
of object one wants. This means such variables are processed between
the runtime & the time when the server sends the compiled page back to
the client browser. Do the different Page events fire during this
time? What happens during this time?

Thanks once again,

Regards,

Ron
 
M

Mark Rae [MVP]

What I would like to know is the time during which these events fire -
is that time known as the runtime?

I think perhaps you're getting bogged down by nomenclature...

Runtime is a term which is used to denote when an application (WinForms or
WebForms) is actually running as opposed to when it is being designed /
developed...

E.g. when you add webcontrols to your markup in the designer, they are said
to be created at *design-time*.

However, when you add controls dynamically while the app is actually
running, they are said to be added at *runtime* because they don't exist
until the app is runnning...

No events fire at design-time, because the app isn't actually running at
design-time...

Runtime simply means "when the app is running"...
 
R

rn5a

I think perhaps you're getting bogged down by nomenclature...

Runtime is a term which is used to denote when an application (WinForms or
WebForms) is actually running as opposed to when it is being designed /
developed...

E.g. when you add webcontrols to your markup in the designer, they are said
to be created at *design-time*.

However, when you add controls dynamically while the app is actually
running, they are said to be added at *runtime* because they don't exist
until the app is runnning...

No events fire at design-time, because the app isn't actually running at
design-time...

Runtime simply means "when the app is running"...
I think perhaps you're getting bogged down by nomenclature...

I guess you are right.....

I learnt the term "late binding" from a book which I am using to learn
ASP.NET. As stated in the book (& as stated in my previous post), late
binding means variables of type "Object" are not processed until
runtime but then variables of other data types are also not processed
until runtime i.e. until the app is run. Variables, let them be of any
data type, will be processed only when the app is being run (obviuosly
never at design time). So why does the book specifically mention that
*variables of "Object" data type are not processed until runtime*?

Also, if I am not wrong, it can be concluded from the statement given
in the book that variables of data types other than the "Object" data
type are bound early (early binding) Irrespective of whether
variables are bound early or late, the binding takes place during
runtime. So does late binding mean variables of "Object" data type are
processed only AFTER variables of all other data types have been
processed? If not, then what's the difference between late binding &
early binding?

Ron
 
M

Mark Rae [MVP]

I learnt the term "late binding" from a book which I am using to learn
ASP.NET. As stated in the book (& as stated in my previous post), late
binding means variables of type "Object" are not processed until
runtime but then variables of other data types are also not processed
until runtime i.e. until the app is run. Variables, let them be of any
data type, will be processed only when the app is being run (obviuosly
never at design time). So why does the book specifically mention that
*variables of "Object" data type are not processed until runtime*?

See below...
Also, if I am not wrong, it can be concluded from the statement given
in the book that variables of data types other than the "Object" data
type are bound early (early binding) Irrespective of whether
variables are bound early or late, the binding takes place during
runtime. So does late binding mean variables of "Object" data type are
processed only AFTER variables of all other data types have been
processed? If not, then what's the difference between late binding &
early binding?

Early binding and late binding were important before .NET, but are largely
irrelevant now...

Early binding means defining a variable of a specific type because you know
at design-time what type of variable you need...

DataSet MyDataSet = new DataSet();

Late binding means defining a variable of a non-specific type (usually an
Object variable) because all you know at design-time is that you will need a
variable of one sort or another, but can't know what *specific* type until
runtime...

object MyDataObject = null; // design-time

protected void Page_Load(object sender, EventArgs e) // runtime
{
if (SomeCondition)
{
MyDataObject = new DataSet();
}
else
{
MyDataObject = new SqlDataReader();
}
}
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top