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

Discussion in 'ASP .Net' started by lander, Mar 2, 2008.

  1. lander

    lander Guest

    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...
     
    lander, Mar 2, 2008
    #1
    1. Advertising

  2. lander

    Madhur Guest

    Re: What does "Page Load" and "Page Unload", "Page Life Cycle" exactly mean????

    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
     
    Madhur, Mar 2, 2008
    #2
    1. Advertising

  3. Re: What does "Page Load" and "Page Unload", "Page Life Cycle" exactly mean????

    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>
     
    Michael Nemtsev [MVP], Mar 3, 2008
    #3
  4. Re: What does "Page Load" and "Page Unload", "Page Life Cycle" exactly mean????

    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>
     
    Michael Nemtsev [MVP], Mar 3, 2008
    #4
  5. Re: What does "Page Load" and "Page Unload", "Page Life Cycle" exactly mean????

    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" <> wrote in message
    news:...
    > 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...
     
    George Ter-Saakov, Mar 3, 2008
    #5
  6. Re: What does "Page Load" and "Page Unload", "Page Life Cycle" exactly mean????

    "lander" <> wrote in message
    news:...

    > 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
     
    Mark Rae [MVP], Mar 3, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Rilling
    Replies:
    5
    Views:
    377
    Peter Rilling
    Mar 9, 2005
  2. Guest
    Replies:
    3
    Views:
    2,833
    Bruce Barker
    Sep 6, 2005
  3. AC [MVP MCMS]
    Replies:
    0
    Views:
    410
    AC [MVP MCMS]
    Jun 10, 2006
  4. clintonG

    App_Code and the Page Life Cycle

    clintonG, Jul 15, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    534
    clintonG
    Jul 15, 2006
  5. Gary Larimer

    Page life cycle and Page.IsValid property

    Gary Larimer, Jul 30, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    414
    Gary Larimer
    Aug 1, 2008
Loading...

Share This Page