Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/02/2002, 12:43
Avatar de ashketchum
ashketchum
 
Fecha de Ingreso: julio-2001
Ubicación: En algun lugar de un gran pais
Mensajes: 418
Antigüedad: 23 años, 10 meses
Puntos: 0
Re: contador en asp

Tienes que crear un archivo que se llame counter.txt y ponerlo en la raiz del sitio, despues coloca este codigo en donde quieras que este el contador

<%
Dim fso, tsm, value
Set fso = Server.CreateObject("Scripting.FileSystemObje ct")
Set tsm = fso.OpenTextFile (Server.MapPath("counter.txt"),1,false)
value = Trim(tsm.ReadLine)
tsm.Close
If Not Session("counter") Then
value = value + 1
Session("counter") = true
Set tsm = fso.CreateTextFile (Server.MapPath("counter.txt"),true)
tsm.WriteLine(value)
tsm.Close
End If
Set tsm = Nothing
Set fso = Nothing
Response.Write (value)
%>

saludos y suerte
PD: este codigo se tomo de aspfacil.com puedes checar mas referencias ahi

@sh (Maestro Pokémon trajo esto para tí) :P<br> Fomentando el concepto "INTERNET"