<%
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFileRead = objFSO.OpenTextFile(Server.MapPath("raknare.txt"), 1, True)
If Session("Counted") = "" Or IsNull(Session("Counted")) Then
If objFileRead.AtEndOfStream = False Then iCounter = objFileRead.ReadAll Else iCounter = 0
If iCounter = "" Or IsNumeric(iCounter) = False Then iCounter = 0
iCounter = CLng(iCounter) + 1 ' Bytt till CLng (Long)
Set objFile = objFSO.OpenTextFile(Server.MapPath("raknare.txt"), 2, True)
objFile.Write iCounter
objFile.Close
Set objFile = Nothing
Else
If objFileRead.AtEndOfStream = False Then iCounter = objFileRead.ReadAll Else iCounter = 1
End If
Session("Counted") = True
Set objFileRead = Nothing
Set objFSO = Nothing
%>