Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Session variables does not increment

Session variables does not increment

Scheduled Pinned Locked Moved ASP.NET
testingbeta-testinghelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aransiola
    wrote on last edited by
    #1

    i declare a variable to track the number of visitors to my web app in .asax file like app_start event application("userscount")=0 session_start event application("userscount")+=1 session_end event application("userscount")-=1 on testing the webapp by opening several sessions of a page to test the count, the Session_Start event works fine, but on closing a session, teh session_end event does not decrement pls help t.aransiola

    V 1 Reply Last reply
    0
    • A aransiola

      i declare a variable to track the number of visitors to my web app in .asax file like app_start event application("userscount")=0 session_start event application("userscount")+=1 session_end event application("userscount")-=1 on testing the webapp by opening several sessions of a page to test the count, the Session_Start event works fine, but on closing a session, teh session_end event does not decrement pls help t.aransiola

      V Offline
      V Offline
      Vikram kshatriya
      wrote on last edited by
      #2

      HI Aransiola, If you use the Session variable rather then application as i saw in your example above then this will work fine. Use like this: Session("userscount") in place of application("userscount") and if you want to count then application variable is fine but you have to use application_start event .

      Vicky

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups