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

count visits

I'd like to count the number of visits of my page so I need find out an
event raised only when the app starts. I think this could be the
Session_OnStart but I don't know whats the object who send it.

Thank you.
Nov 17 '05 #1
3 1406
No that doesn't happen when the application starts. It happens when the
session starts. Put a counter variable in there and increment it. It will
need to be stateful, that is it needs to remember the value. You can find
the session_start event in the global.asax.x file.

regards

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Alberto" <al*****@nospam.es> wrote in message
news:ep**************@tk2msftngp13.phx.gbl...
I'd like to count the number of visits of my page so I need find out an
event raised only when the app starts. I think this could be the
Session_OnStart but I don't know whats the object who send it.

Thank you.

Nov 17 '05 #2
Could you tell me how to find it?
Actually I see the Global.asax and the Global.asax.cs. In the Global.asax.cs
I can see this events:
acquireRequestState
AuthenticatedRequest
BeginRequest
Disposed
Elapsed
EndRequest
Error
PostRequestHandlerExecute
PreRequestHandlerExecute
PreSendRequestContent
PreSendRequestHeaders
ReleaseRequestState
ResolvedRequestCache
UpdateRequestCache

Thank you for your help
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > escribió en
el mensaje news:ur**************@TK2MSFTNGP10.phx.gbl...
No that doesn't happen when the application starts. It happens when the
session starts. Put a counter variable in there and increment it. It will
need to be stateful, that is it needs to remember the value. You can find
the session_start event in the global.asax.x file.

regards

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Alberto" <al*****@nospam.es> wrote in message
news:ep**************@tk2msftngp13.phx.gbl...
I'd like to count the number of visits of my page so I need find out an
event raised only when the app starts. I think this could be the
Session_OnStart but I don't know whats the object who send it.

Thank you.


Nov 17 '05 #3
Look in Global.aspx for Session_Start(). In addition to storing your
counter in some statefull way, you'll also need to store it in some long
term way (for when you have to re-boot the server for whatever reason).
I've found that saving the hit count in an Application variable
(incrementing it in the Session_Start) and storing the latest value in a
counter file on the server works well. It does mean that in the
Application_Start event of Global.aspx, you need to read that file and set
the Application variable to the value in that file.


"Alberto" <al*****@nospam.es> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...
Could you tell me how to find it?
Actually I see the Global.asax and the Global.asax.cs. In the Global.asax.cs I can see this events:
acquireRequestState
AuthenticatedRequest
BeginRequest
Disposed
Elapsed
EndRequest
Error
PostRequestHandlerExecute
PreRequestHandlerExecute
PreSendRequestContent
PreSendRequestHeaders
ReleaseRequestState
ResolvedRequestCache
UpdateRequestCache

Thank you for your help
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > escribió en el mensaje news:ur**************@TK2MSFTNGP10.phx.gbl...
No that doesn't happen when the application starts. It happens when the
session starts. Put a counter variable in there and increment it. It will need to be stateful, that is it needs to remember the value. You can find the session_start event in the global.asax.x file.

regards

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Alberto" <al*****@nospam.es> wrote in message
news:ep**************@tk2msftngp13.phx.gbl...
I'd like to count the number of visits of my page so I need find out an event raised only when the app starts. I think this could be the
Session_OnStart but I don't know whats the object who send it.

Thank you.



Nov 17 '05 #4

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

Similar topics

14
by: NotGiven | last post by:
I am guessing I would hold a variable of when it's opened, then in the script that runs when the page is offloaded, I coudl calcualte it. How do you store a time variable? How do you calculate...
3
by: Jonathan Driller | last post by:
I am very new to this and would greatly appreciate some insight. I am trying to learn Python by doing something useful; write a script that will count and output my aggregated visits to my website....
9
by: goks | last post by:
I'm using document.referrer method for tracking visits on my site. But it seems that, when someone finds my site with google, this method returns only: "google.com/search?q=xxxxx" (good) or...
1
by: KiwiBrian | last post by:
I am using Statcounter to log site visits Upon enquiring whether the service logged visits from my site to external sites using site links I was given the following information:- "You have to...
2
by: Bobwhosmiles | last post by:
Hi, I use access to query a Jet database full of info about members of a club. Each attendance by each member at any of 18 sites is recorded in a table called qptHisAttendance I'm trying to...
2
by: eloi-ribeiro.blogspot.com | last post by:
Hi, I'm having a problem with a query. I'm running Access 2000 and a table with 35000 rows. The table contains several visits to the spots with a CODE (spot code) and DATE (visit date)...
0
by: philippezzz | last post by:
I have 3 tables clients -cID //pk -cName visits -vID //pk -cID //client ID -vDate //format YYYY-MM-DD
3
by: Dev | last post by:
Dear All, i have get combination of four PHP script for count the visitor of website but when i apply all these i have no answer. i am posting the code of all four PHP script below. CODE OF...
1
by: dez5000 | last post by:
I'm trying to get a report by location that would list the number of visits to the location for the month but also count the number of unique visitors to that location. I have a table of data with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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:
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
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...

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.