473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

what to do when browser closes

hi Friends,
I am doing an ASP Application,I did it in such a way that when a user enters/login to the forum,some databse transactions happens and when he want to logout,he has to click on the signout link.Then another ASP page will be
executed behind the screen and it will finish my database transactions(Updation of tables-change online status to offline,etc...,tracking logout time etc..).
But now I want do it in another way !
If I close the browser,These above things should happen.........

How it should be....... ?
Please suggest a way clearly

Regards
Shyju
Feb 15 '07 #1
3 1074
MMcCarthy
14,534 Expert Mod 8TB
This question is being moved to the ASP forum.

ADMIN
Feb 15 '07 #2
clain
79
Its very simple... you can do it with java script ,

in javascriot we have an in built function onUnload ()

this is triggred while page is closed or diverted to another page...

so you can call your asp page to save in this onUnload function..

which in turn will save your data..

chears....and happy coding...
Feb 21 '07 #3
I did it using the Session_OnEnd Event in Global.asa file of my application.
Mar 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John Dalberg | last post by:
I have a closed box system which opens an html page. The page closes by the system. I have access to the html page. I added code to open a child window from this page. However when the parent...
3
by: Bruce W.1 | last post by:
A user posts a request that takes a long time to process, say two minutes, before a response is returned. What happens if in this two minutes the user closes their browser. Does the server have...
1
by: buran | last post by:
Dear ASP.NET Programmers, I am developing an intranet application using ASP.NET. I want to add such a functionality that the application displays a pop-up box to confirm when the user tries to...
5
by: news.microsoft.com | last post by:
Hi everyone, I need some help (may be in the form of some sample code) for the subject question. I have an ASP.NET/C# application. I need to do quite a few tasks when the session ends. I...
3
by: Charlie | last post by:
Hi: I would like to clear session when user closes browser window by clicking the "x" in upper right hand corner. Since this is a client side event, how do I run server code (Session.Abandon())...
6
by: Annie | last post by:
Hi guys, I just want to do some clean up in the Session_End at Global.aspx. However, if the user closes the browser window that event is not fired. how can I call explicity protected void...
15
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
4
by: =?Utf-8?B?RGVhbiBHYXJyZXR0?= | last post by:
I'm writing a .NET 2.0 app that needs to manage user sessions. We're using SQL Server 2005 tables to hold sessions status fields in a table. The problem is how to handle the situation where a user...
3
by: spoonybard | last post by:
Hi Everyone, I have a .Net 2.0 C# web application that has important information stored in Sessions that needs to be deleted when the user closes the browser. I know of three ways a user can close...
3
by: T. Wintershoven | last post by:
Hi all, After a visitor has loged in, a session is started. The session is destroyed after the visitor clicked "Log out'. When the visitor forgets to log out and closes the browser...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.