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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lander

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

    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...
  • Michael Nemtsev [MVP]

    #2
    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


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


    Comment

    • Michael Nemtsev [MVP]

      #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 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


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


      Comment

      • George Ter-Saakov

        #4
        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" <lostlander.tom @gmail.comwrote in message
        news:095196a7-965c-49fc-b047-a483ee1b953d@s1 9g2000prg.googl egroups.com...
        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...

        Comment

        • Mark Rae [MVP]

          #5
          Re: What does &quot;Page Load&quot; and &quot;Page Unload&quot;, &quot;Page Life Cycle&quot; exactly mean????

          "lander" <lostlander.tom @gmail.comwrote in message
          news:095196a7-965c-49fc-b047-a483ee1b953d@s1 9g2000prg.googl egroups.com...
          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


          Comment

          Working...