Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > What does "Page Load" and "Page Unload", "Page Life Cycle" exactlymean????

Reply
Thread Tools

What does "Page Load" and "Page Unload", "Page Life Cycle" exactlymean????

 
 
lander
Guest
Posts: n/a
 
      03-02-2008
I've read the page life cycle thing in msdn, still, i'm getting a bit
confused of thinking how all the things are going under the hood...

I know that when page loading, that the controls' properties is
populated and when page unloading, the resources are cleared.

What I want to know is what's happening behind it, that is, from the
perspective of the asp.net implementor.....I'm not sure whether i've
stated clearly, hope you get it.

And, as for page life cycle. Does it mean that a request comes in a
page object and a HTTPContext object is contructed for the request,
when the request has been processed, the page object is destroyed as
well as all other resources......I'm not very sure of it...

Thanks for your attention...
 
Reply With Quote
 
 
 
 
Madhur
Guest
Posts: n/a
 
      03-02-2008
lander wrote:
> I've read the page life cycle thing in msdn, still, i'm getting a bit
> confused of thinking how all the things are going under the hood...
>
> I know that when page loading, that the controls' properties is
> populated and when page unloading, the resources are cleared.
>
> What I want to know is what's happening behind it, that is, from the
> perspective of the asp.net implementor.....I'm not sure whether i've
> stated clearly, hope you get it.
>
> And, as for page life cycle. Does it mean that a request comes in a
> page object and a HTTPContext object is contructed for the request,
> when the request has been processed, the page object is destroyed as
> well as all other resources......I'm not very sure of it...
>
> Thanks for your attention...


I am not an expert but still give you some comments.

You are right , when the request comes in, the ASP.NET instantiates the
object for corresponding class, executes the required events, and then
finally unloades it after emitting the HTML to client.

May be you can read more on Page Life Cycle on ASP.NET

--
Madhur

http://madhurahuja.blogspot.com


 
Reply With Quote
 
 
 
 
Michael Nemtsev [MVP]
Guest
Posts: n/a
 
      03-03-2008
Hello lander,

I recommend you to use .NET Reflector http://www.aisto.com/roeder/dotnet/
to check what happens inside that methods


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


l> I've read the page life cycle thing in msdn, still, i'm getting a bit
l> confused of thinking how all the things are going under the hood...
l>
l> I know that when page loading, that the controls' properties is
l> populated and when page unloading, the resources are cleared.
l>
l> What I want to know is what's happening behind it, that is, from the
l> perspective of the asp.net implementor.....I'm not sure whether i've
l> stated clearly, hope you get it.
l>
l> And, as for page life cycle. Does it mean that a request comes in a
l> page object and a HTTPContext object is contructed for the request,
l> when the request has been processed, the page object is destroyed as
l> well as all other resources......I'm not very sure of it...
l>
l> Thanks for your attention...
l>


 
Reply With Quote
 
Michael Nemtsev [MVP]
Guest
Posts: n/a
 
      03-03-2008
Hello lander,

I recommend you to use .NET Reflector http://www.aisto.com/roeder/dotnet/
to check what happens inside these methods


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


l> I've read the page life cycle thing in msdn, still, i'm getting a bit
l> confused of thinking how all the things are going under the hood...
l>
l> I know that when page loading, that the controls' properties is
l> populated and when page unloading, the resources are cleared.
l>
l> What I want to know is what's happening behind it, that is, from the
l> perspective of the asp.net implementor.....I'm not sure whether i've
l> stated clearly, hope you get it.
l>
l> And, as for page life cycle. Does it mean that a request comes in a
l> page object and a HTTPContext object is contructed for the request,
l> when the request has been processed, the page object is destroyed as
l> well as all other resources......I'm not very sure of it...
l>
l> Thanks for your attention...
l>


 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      03-03-2008
That is how WebServer /Browser (any web server) work

Browser connects to server, asks for URL, takes a response, Disconnect.....

thus if you have one HTML page with 3 images on it, Browser will connect,
ask for HTML, disconnect
Connect again, ask for 1st image, disconnect
Connect again, ask for 2nd image, disconnect
Connect again, ask for 3rd image, disconnect



George,.


"lander" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've read the page life cycle thing in msdn, still, i'm getting a bit
> confused of thinking how all the things are going under the hood...
>
> I know that when page loading, that the controls' properties is
> populated and when page unloading, the resources are cleared.
>
> What I want to know is what's happening behind it, that is, from the
> perspective of the asp.net implementor.....I'm not sure whether i've
> stated clearly, hope you get it.
>
> And, as for page life cycle. Does it mean that a request comes in a
> page object and a HTTPContext object is contructed for the request,
> when the request has been processed, the page object is destroyed as
> well as all other resources......I'm not very sure of it...
>
> Thanks for your attention...



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      03-03-2008
"lander" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> And, as for page life cycle, does it mean that a request comes in a
> page object and a HTTPContext object is contsructed for the request,
> when the request has been processed, the page object is destroyed as
> well as all other resources?


Yes.

The web works on a request / response architecture.

A client (e.g. a web browser) sends an HttpRequest to a web server.

The web server processes the HttpRequest, and then sends back an
HttpResponse if it can.

The web server has not the slightest idea what the client does with that
HttpResponse because, apart from very exceptional cases, there is no
permanent between web browser and web server...

This is often the most difficult concept for WinForms developers to grasp,
and one of the reasons why e.g. a web server can't know when a web browser
has been closed or even when the user has navigated away to another site...


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Life Balance Coaching: Balance Work And Life Like A Pro 88059355 Digital Photography 1 01-06-2008 07:32 PM
The Nature Of Life As Seen From Earth - Life Energy Particles - Perception At A Distance {HRI 20010829-pi9-V2.0} - (part issue 9 Version 2.0 on 21 Aug 2005) Koos Nolst Trenite DVD Video 1 08-28-2005 09:23 AM
Have trouble in your life? Having the best time in your life? psion Computer Support 11 05-18-2004 06:51 AM
Flash memory udeful life and data storage life jriegle Digital Photography 0 10-16-2003 11:07 PM



Advertisments