Destroying objects in Page_Unload event

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
 
P

Peter Rilling

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.
 
K

Kevin Spencer

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top