<%
Set fs=CreateObject("Scripting.FileSystemObject")
Path=server.mappath("counter.txt")
Set a=fs.OpenTextFile(path)
counter=CInt(a.ReadLine)
If Session("counter")="" then
Session("counter")=counter
counter=counter + 1
a.close
Set a=fs.CreateTextFile(path, True)
a.WriteLine(counter)
End If
a.Close
Response.Write counter
%>