Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

 

I've got a question,

What I want to do is this: if a page is UNLOADED say by clicking on a close button on the page OR by clicking on the (x) button on top of the window),I want to set a few session objects to nothing.

But.....

When I try to do this via the Page_Unload event it does it every tim the page loads and reloads... So.. this is not realy what i want...

 

and.... if I click the (x) button the event doen't fire @ all.. :confused:

 

 

So Now I'm stuck with a session object... that isn't destroyed after the window is closed....

 

 

Does anyone have any ID??

 

Tnx

  • Administrators
Posted

Web applications do not work that way. There is no way for the broswer to automatically notify the server that it has been closed.

 

Every time a page is accessed it is created on the server side, it's code is run to generate HTML and then it is destroyed.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Tnx for your reply. ... I've solved the problem by 'destroying' the session obeject on the first load... Not realy the way but... it wordks...

Tnx again!

 

Take care!

Mrb

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...