473,395 Members | 1,577 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,395 software developers and data experts.

hit counter using db and session_start

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
Nov 18 '05 #1
1 1567
"Mark" <py*******@hotmail.com> wrote in
news:e2**************@TK2MSFTNGP11.phx.gbl:
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).
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2

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

Similar topics

5
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1....
9
by: Kenny M. | last post by:
I want to control how many users there are login in my app I have the following code on Session_Start Application.Lock(); Application = int.Parse(Application.ToString()) + 1;...
6
by: Armen Kirakosyan | last post by:
Hi I have web site developed and now wanna to check how many people is connected In all MS articles written to use Application_start Session_start Session_end functions in Global.asa...
10
by: dee | last post by:
Hi How can I add a hit counter persistant across startups? Thanks. Dee
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
3
by: kvnsmnsn | last post by:
I've got a piece of PHP code that gets executed twice. The first time through, variable <$Useris unregistered, so message "jqz cbig90" gets printed to the screen as an error message. When I...
0
by: nintesa | last post by:
Hello from Italy! I'm trying to create a little script (php/mysql/javascript) to record visits of some of my sites. I have sites www.a.com, www.b.com ecc... and I have my counter script on...
3
by: tedpottel | last post by:
Hi I cannot get sessions to work. I have the following code </body> <? session_start(); $counter++; print "You have visited this page $counter times during this session";...
3
by: DavidPr | last post by:
I made a website for a group of people and they want a visitor counter on it. I don't like hit counters because if the site is dead everyone will know it. But, it's their website. I did an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.