counter session

Results 1 to 2 of 2

Thread: counter session

  1. #1
    cjam Guest

    Default counter session

    Hi, I&#039;m a semi-newbie to this VB stuff. I&#039;m trying to make a page counter using the microsoft given page counter object, but I do not want it to increment when I simply push &#039;reload / refresh&#039; in the browser. <BR>I asked here earlier and was told about the session variable, of which i understand the concept, and I have implemented it (i think) but it still increases the counter when i push Refresh.<BR>here is the code:<BR><BR>&#060;%<BR>if not session("page") = "testit.asp" then<BR>Set MyPageCount = Server.CreateObject("mswc.PageCounter")<BR>MyPageC ount.PageHit<BR>HitMe = MyPageCount.Hits<BR>session("page") = "testit.asp"<BR>end if<BR>%&#062;<BR>You are visitor #&#060;%=HitMe%&#062; <BR><BR><BR>can anyone see where the problems(s) are?<BR><BR>thanks,<BR>cjam

  2. #2
    Join Date
    Dec 1969

    Default RE: counter session

    well, that&#039;s what will happen. refresh does actually reload the page, so it&#039;s another hit. no way round it buster. at least, no practical way that&#039;s worth spending the time on.<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts