Destroying objects in Page_Unload event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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.
 
Back
Top