ASP counters query

Results 1 to 3 of 3

Thread: ASP counters query

  1. #1
    cjam Guest

    Default ASP counters query

    Hi, i want a simple, simple page counter to use on my web pages.<BR>Text is fine, nothing fancy. I&#039;ve tried a few other asp scripts to do with the subject they all seem overly complicated and do not stop the incrementation with a reload.<BR>I&#039;ve just learned about the given Microsoft page counter object<BR>e.g.,<BR>&#060;%<BR>Set MyPageCount = Server.CreateObject("mswc.PageCounter")<BR>MyPageC ount.PageHit<BR>HitMe = MyPageCount.Hits<BR>%&#062;<BR>You are visitor #&#060;%=HitMe%&#062; <BR><BR><BR>-<BR>This is perfect for what i want, but how do i stop it from incrementing the counter everytime I do a simple refresh/reload. I don&#039;t want it do increase everytime someone reloads a page and surely other people have the same requirements? yet all of the &#039;simple&#039; examples i&#039;ve found increase the counter unnecessarily on a reload. <BR><BR>Anyone have any ideas on how to make the microsoft version stop incrementing on reload?<BR><BR>thanks,<BR>cjam

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP counters query

    Why not use a sesson variable to store page names and check them against the current page, i.e. :<BR><BR>if not session("page") = "this_page.asp" then<BR>Set MyPageCount = Server.CreateObject("mswc.PageCounter")<BR>MyPageC ount.PageHit<BR>HitMe = MyPageCount.Hits<BR>session("page") = "this_page.asp"<BR>end if<BR><BR>Get the idea?<BR><BR>MikeD

  3. #3
    cjam Guest

    Default RE: ASP counters query

    yes, i get the idea, but i&#039;m only a novice at this game... :)<BR>I know the theory, but not necessarily how to do it!<BR><BR>I&#039;ll try and figure this out now..<BR>thanks,<BR>cjam

Posting Permissions

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