Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

What happens after runtime?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rn5a@rediffmail.com - 07 Oct 2007 17:09 GMT
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
Mark Fitzpatrick - 07 Oct 2007 21:37 GMT
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.

Signature

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

> The different Page events in the page life cycle like Page_PreInit,
> Page_Init, Page_Load etc. - are they different stages of the runtime
[quoted text clipped - 6 lines]
>
> Thanks
rn5a@rediffmail.com - 07 Oct 2007 23:04 GMT
> 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
[quoted text clipped - 26 lines]
>
> - 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
Mark Rae [MVP] - 08 Oct 2007 00:14 GMT
> 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"...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

rn5a@rediffmail.com - 08 Oct 2007 04:09 GMT
> <r...@rediffmail.com> wrote in message
>
[quoted text clipped - 24 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

> 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
Mark Rae [MVP] - 08 Oct 2007 09:22 GMT
> 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
[quoted text clipped - 4 lines]
> 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
[quoted text clipped - 4 lines]
> 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();
   }
}

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Juan T. Llibre - 07 Oct 2007 23:00 GMT
Please review the ASP.NET page lifecycle :

http://msdn2.microsoft.com/en-us/library/ms178472(VS.80).aspx

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> The different Page events in the page life cycle like Page_PreInit,
> Page_Init, Page_Load etc. - are they different stages of the runtime
[quoted text clipped - 6 lines]
>
> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.