ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

Script Output:
Current Count: 282725

ASP HTML Download            FAQ

The actual counter script ("count_db_inc.asp")


ASP.NET Version

This is another counter script. It uses a database to store the counts so it's really pretty easy to maintain multiple counts using this one file. All you need to do is include it into your asp file and it'll do the database work and print out the count for that file. It even automatically adds records when a page is first hit!

If you're interested, a sample version of the database in Access 2000 format is available. If you don't have Access 2000 or want to use a different database it's really simple to create the table yourself. The script expects a table named hit_count with two fields: page_name and hit_count. Page_name is a text field set to 255 characters (SQL Server varchar(255)) and hit_count is a long integer (SQL Server int). I've also set page_name as the primary key.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers