I have this code as a hit counter on my page, is this the most efficient way to make a hit counter,Code:Dim dblcount As Double Dim mystreamreader As New System.IO.StreamReader("C:\INETPUB\WWWROOT\COUNTER\COUNTER.txt") dblcount = mystreamreader.ReadLine dblcount = dblcount + 1 mystreamreader.Close() Dim mystreamwriter As New System.IO.StreamWriter("C:\INETPUB\WWWROOT\COUNTER\COUNTER.txt") mystreamwriter.Write(dblcount) mystreamwriter.Close() Label1.Text = dblcount.ToString
and 2 for some reason the counter got reset to 0 what would of caused this since it was working fine.




Reply With Quote