Adding commas to a page counter

Z

zenfor

Hi,

I have a simple script I found that increments a number in a text file.
I was wondering if anyone has a routine that will commify the number.
Thank you!
===============

<%
counter_file = Server.MapPath("counter/test.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(counter_file)
counter = Clng(a.ReadLine)
if Session("counter") = "" then
Session("ct") = counter
counter = counter + 1
a.close
Set a = fs.CreateTextFile(counter_file, True)
a.WriteLine(counter)
end if
a.Close
%>
This website now has <font color="#FF0000" size=4><strong><%= counter
%></strong></font> Total Hits
 
Z

zenfor

I found the answer!! Thanks!

This website now has <font color="#FF0000" size=4><strong><%=
formatnumber(counter, standard) %></strong></font> Total Hits
 

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

Similar Threads

New to ASP need help 1
I'm a Newbie 1
Visit Counter II 0
Custom Hit Counter 0
Writing to a file "Bad file mode" 1
Session Variable 1
Save a web page 3
Whistling in the wind 2

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top