hit counter using db and session_start

M

Mark

I know I've seen an example of this, but can't seem to find it (I thought it
was in my copy of 'ASP.NET Uleashed?).

I want to use session_start in my global.asaax file to update a hit counter
in an access db. The things I'm bot sure of:

Can I put tthe db read and update code in the session_start event?. Or do I
need to create a variable and access it from else where?

And if a user visits my site and the counter is incremented by one (a new
session is started), and then he/she logs in to view some password protected
stuff (forms authentication), will the counter be incremented again (is a
new session created or not? )?
I
 
L

Lucas Tam

I know I've seen an example of this, but can't seem to find it (I
thought it was in my copy of 'ASP.NET Uleashed?).

I want to use session_start in my global.asaax file to update a hit
counter in an access db. The things I'm bot sure of:

Can I put tthe db read and update code in the session_start event?. Or
do I need to create a variable and access it from else where?

You can put DB read/write code there.
And if a user visits my site and the counter is incremented by one (a
new session is started), and then he/she logs in to view some password
protected stuff (forms authentication), will the counter be
incremented again (is a new session created or not? )?

No, it's the same session (but authenticated).
 

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,774
Messages
2,569,598
Members
45,160
Latest member
CollinStri
Top