How to activate session_end in asp.net on closing the browser

S

sundar_s1210

I am doing a Shop Cart application

In my asp.net application, i want to delete some records from database
when user closes the browser without purchasing the product which is
added to shop cart.
I have written this logic in session_end,but it is not activated when
user closes the browser
 
S

Scott Allen

Hi sundar:

The browser doesn't notify the server when it closes, Session_End
fires after a predetermined timeout period (configurable in web.config
- the default is 20 minutes).
 
M

Mark Rae

I have written this logic in session_end,but it is not activated when
user closes the browser

That's right - closing the browser does not activate Session_End. Pretty
much the best you can hope for is to get your users to log out cleanly by
means of a Log Out button or somesuch which will postback and call the
Session.Abandon() method...
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top