Destroying objects in Page_Unload event

Discussion in 'ASP .Net' started by =?Utf-8?B?dnZlbms=?=, Nov 9, 2005.

  1. Hello:

    I was trying to destroy objects in the Page_Unload event.

    That's when I see that the Page_Unload event gets triggered when I load a
    page, right after it completes page_load event! Why?

    Venki
     
    =?Utf-8?B?dnZlbms=?=, Nov 9, 2005
    #1
    1. Advertising

  2. When do you expect it to be invoked? The pages goes through its entire life
    cycle (Init, Load, PreRender, Unload) for each page request. Unload happens
    right after the server sends the content to the browser and so the server no
    longer needs to maintain the objects. Remember, page requests are
    stateless.

    "vvenk" <> wrote in message
    news:...
    > Hello:
    >
    > I was trying to destroy objects in the Page_Unload event.
    >
    > That's when I see that the Page_Unload event gets triggered when I load a
    > page, right after it completes page_load event! Why?
    >
    > Venki
     
    Peter Rilling, Nov 9, 2005
    #2
    1. Advertising

  3. vvenk wrote:
    > Hello:
    >
    > I was trying to destroy objects in the Page_Unload event.
    >
    > That's when I see that the Page_Unload event gets triggered when I
    > load a page, right after it completes page_load event! Why?
    >
    > Venki

    Any of the articles in this search will likely answer your question:
    http://www.google.com/search?hl=en&...GLD:2005-37,GGLD:en&q=asp.net page life cycle

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 9, 2005
    #3
  4. Reposting is not a good idea. See my answer to your other post. If you can
    find it.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Complex things are made up of
    Lots of simple things.

    "vvenk" <> wrote in message
    news:...
    > Hello:
    >
    > I was trying to destroy objects in the Page_Unload event.
    >
    > That's when I see that the Page_Unload event gets triggered when I load a
    > page, right after it completes page_load event! Why?
    >
    > Venki
     
    Kevin Spencer, Nov 9, 2005
    #4
    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. Heidi Hundåla

    Page_Unload event fires to early

    Heidi Hundåla, Oct 22, 2003, in forum: ASP .Net
    Replies:
    15
    Views:
    3,588
    Jeffrey Tan[MSFT]
    Nov 10, 2003
  2. Larry Morris

    Page_Unload event firing twice.

    Larry Morris, Dec 30, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,429
    bruce barker
    Dec 30, 2004
  3. dana lees

    Page_Unload event

    dana lees, Nov 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    519
    Brock Allen
    Nov 28, 2005
  4. =?Utf-8?B?Um9sYW5kcGlzaA==?=

    Where is Page_Unload event?

    =?Utf-8?B?Um9sYW5kcGlzaA==?=, Jun 1, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    5,310
    =?Utf-8?B?Um9sYW5kcGlzaA==?=
    Jun 3, 2007
  5. Waldy

    Page_UnLoad Event

    Waldy, Apr 16, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    665
    Cowboy \(Gregory A. Beamer\)
    Apr 16, 2009
Loading...

Share This Page