944,124 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1671
  • ASP RSS
Jun 1st, 2006
0

script for number of views

Expand Post »
Hi,

I have a webpage with articles and I would like to indicate the number of views for each article. Can anyone help me with the correct form/script in asp format?

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
akhalfan is offline Offline
1 posts
since Jun 2006
Jun 7th, 2006
0

Re: script for number of views

do you have a database?

if so set up a command to update it. so you would have the article number. when the page is called a recordset retrieves the last value and then adds one. the command then updates the record to be the new value. you might want to use sessions though that it doesnt count EVERYTIME the same user views the page for that session. like a refresh of page.

the other way you could do it if your hosting server is stable is use application variables. which would reset if the server ever went down but is the easiest to use.

the other way is via a text file for each page. it reads the text file adds one then writes back to the text file the updated figure. not very practical as plenty text files get created then
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Challenging Problem in PASSing Data to Server, Plz Help
Next Thread in ASP Forum Timeline: How to transfer





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC