473,320 Members | 2,083 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,320 software developers and data experts.

save settings on browser close

Hi all,

I've been trying to save some user settings when the
browser closes, but with little success. What I want to do
is count a users' resource usage, and write it to a
database when the user closes the browser. I tried to use
the 'Session_End' event handler in global.asax, but that
doesn't seem to work.

Any Ideas?
Jul 19 '05 #1
6 3586
CJM
Session_OnEnd is very unreliable.

I would also forget about trying to pin down when a user entered the system
and when a user left the system, as you might have done with a traditional
client-server application.

It is much more practical to record what pages a user calls, and when...
You can determine that user left within 20 mins of the last page request
(assuming you leave the default timeout).

What do you mean by resource usage?

Time on the system, I assume?

Chris
"Jaco Bregman" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Hi all,

I've been trying to save some user settings when the
browser closes, but with little success. What I want to do
is count a users' resource usage, and write it to a
database when the user closes the browser. I tried to use
the 'Session_End' event handler in global.asax, but that
doesn't seem to work.

Any Ideas?

Jul 19 '05 #2
Our website uses a third party Internet service for which
we have to pay. In order to bill our customers for usage
of this service, we count the number of times this service
is used, and store this in a Session object. When the
browser closes, we want to write the usage count to our
database.

If the user leaves our website, can I still retrieve the
information from the session object?

Jaco
-----Original Message-----
Session_OnEnd is very unreliable.

I would also forget about trying to pin down when a user entered the systemand when a user left the system, as you might have done with a traditionalclient-server application.

It is much more practical to record what pages a user calls, and when...You can determine that user left within 20 mins of the last page request(assuming you leave the default timeout).

What do you mean by resource usage?

Time on the system, I assume?

Chris
"Jaco Bregman" <an*******@discussions.microsoft.com> wrote in messagenews:05****************************@phx.gbl...
Hi all,

I've been trying to save some user settings when the
browser closes, but with little success. What I want to do is count a users' resource usage, and write it to a
database when the user closes the browser. I tried to use the 'Session_End' event handler in global.asax, but that
doesn't seem to work.

Any Ideas?

.

Jul 19 '05 #3
Yes.
use the Seeion_onEnd event.
--
Roji. P. Thomas
SQL Server Programmer
--------------------------------------
"Jaco Bregman" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
Our website uses a third party Internet service for which
we have to pay. In order to bill our customers for usage
of this service, we count the number of times this service
is used, and store this in a Session object. When the
browser closes, we want to write the usage count to our
database.

If the user leaves our website, can I still retrieve the
information from the session object?

Jaco
-----Original Message-----
Session_OnEnd is very unreliable.

I would also forget about trying to pin down when a user

entered the system
and when a user left the system, as you might have done

with a traditional
client-server application.

It is much more practical to record what pages a user

calls, and when...
You can determine that user left within 20 mins of the

last page request
(assuming you leave the default timeout).

What do you mean by resource usage?

Time on the system, I assume?

Chris
"Jaco Bregman" <an*******@discussions.microsoft.com>

wrote in message
news:05****************************@phx.gbl...
Hi all,

I've been trying to save some user settings when the
browser closes, but with little success. What I want to do is count a users' resource usage, and write it to a
database when the user closes the browser. I tried to use the 'Session_End' event handler in global.asax, but that
doesn't seem to work.

Any Ideas?

.

Jul 19 '05 #4
CJM
No. don't use the Session_OnEnd event.

Each time the user access the service, increment the usage count IN THE
DATABASE.

What happens if their machine crashes? What happens if your server crashes?
What do you do if one of the other 101 events that stop your Session_OnEnd
code from running occurs? It will be as if your user has not used the
service at all... in which case, you pay the bills!

Log each use of the service, directly to the DB, immediately before or
immediately after using the service.. (you chose which)

hth

CHris
Jul 19 '05 #5
hi CJM,
WHY don´t you use trigger on sql server?
take a look at sql server help!
the trigger always starts running when update or delete or insert are
detected in a table.
may be your solution.

REGARDS,
Vilmar
Brazil
"CJM" <cj*****@yahoo.co.uk> escreveu na mensagem
news:Oi**************@TK2MSFTNGP10.phx.gbl...
No. don't use the Session_OnEnd event.

Each time the user access the service, increment the usage count IN THE
DATABASE.

What happens if their machine crashes? What happens if your server crashes? What do you do if one of the other 101 events that stop your Session_OnEnd
code from running occurs? It will be as if your user has not used the
service at all... in which case, you pay the bills!

Log each use of the service, directly to the DB, immediately before or
immediately after using the service.. (you chose which)

hth

CHris

Jul 19 '05 #6
CJM
Hi Vilmar,

First of all the OP might not have access to SQL Server.

Second, I don't see how triggers help in this situation.

Chris

"news.microsoft.com" <su*****@hitecnet.com.br> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
hi CJM,
WHY don´t you use trigger on sql server?
take a look at sql server help!
the trigger always starts running when update or delete or insert are
detected in a table.
may be your solution.

REGARDS,
Vilmar
Brazil

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Marco Krechting | last post by:
Hi All, I have a page with a list of hyperlinks. I want to save information in a cookie about the fact that I entered an hyperlink or not. When I click one of the hyperlinks I want this stored...
7
by: Javaman59 | last post by:
This is about finding the right point at which to save user entered data in the registry, so that when the application is restarted, the saved values will be restored. I want this behaviour to be...
3
by: Jaco Bregman | last post by:
Hi all, I have been trying to save some user settings when my web application closes, but with little success. What I want to do is start a counter on startup, and write the total count to a...
2
by: DraguVaso | last post by:
Hi, I found some examples for storing the FormSettings of a Form in an XML-file, but none of these could match my criteria: What I am looking for is the possibility to save the FormSettings of...
0
by: Robert Love | last post by:
I am trying to save some boolean values from checkboxes using isolated storage. I am able to do strings and integers without a problem but I can't work out how to save boolean values without seeing...
2
by: John | last post by:
I have a Win app in C#. I want to save the data the user enterere into textboxes and the selections the user made to comboboxes when the user close the app. So next time when the user launches the...
0
by: Rob | last post by:
I have a Webservice written in C# that provides data to both a web browser through ASP.net and to a VC++ client. I have been able to retrieve data from SQLServer and passing to my C++ client as...
12
by: =?Utf-8?B?RnJlZU5FYXN5?= | last post by:
Hello, the scenario: There's an ASPX page which shows some text and has three buttons at the bottom: Save, Print and Close. Print and close is done by javascript. But how can I save the page...
3
Atran
by: Atran | last post by:
I want to save my settings after I close my form. example: when I write in a textbox a word and I close the form and open it again see the word I was wrote it. example2: when my form runnig, I set...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.