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. Number of hits on the site

Number of hits on the site

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelp
7 Posts 4 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.
  • Y Offline
    Y Offline
    Yuwraj
    wrote on last edited by
    #1

    I am developing a web application in ASp.net, for that I want the number of hits on the site. pl'z help me :^)

    R S 2 Replies Last reply
    0
    • Y Yuwraj

      I am developing a web application in ASp.net, for that I want the number of hits on the site. pl'z help me :^)

      R Offline
      R Offline
      rizwan afsar
      wrote on last edited by
      #2

      Hi yuvraj Well to count number of hits. What you can do is that you can increment a counter in global.asax's protected void Session_Start(Object sender, EventArgs e) { i++; } this will give the number of hits on ur site Rizwan Afsar Associate Member, Technical Team IAP Company Ltd, Gurgaon INDIA www.iap-online.com "A winner is not the one who never fails, But one who NEVER QUITS" Hope this help's you

      Y 1 Reply Last reply
      0
      • R rizwan afsar

        Hi yuvraj Well to count number of hits. What you can do is that you can increment a counter in global.asax's protected void Session_Start(Object sender, EventArgs e) { i++; } this will give the number of hits on ur site Rizwan Afsar Associate Member, Technical Team IAP Company Ltd, Gurgaon INDIA www.iap-online.com "A winner is not the one who never fails, But one who NEVER QUITS" Hope this help's you

        Y Offline
        Y Offline
        Yuwraj
        wrote on last edited by
        #3

        Thanks a lottttttttttttttttt;)

        R 1 Reply Last reply
        0
        • Y Yuwraj

          Thanks a lottttttttttttttttt;)

          R Offline
          R Offline
          Rajesh_K_Sharma
          wrote on last edited by
          #4

          Visit this link. I think this link will help u http://www.stardeveloper.com/articles/display.html?article=2002102501 Regard rajesh

          Y 1 Reply Last reply
          0
          • R Rajesh_K_Sharma

            Visit this link. I think this link will help u http://www.stardeveloper.com/articles/display.html?article=2002102501 Regard rajesh

            Y Offline
            Y Offline
            Yuwraj
            wrote on last edited by
            #5

            Sir, I got it by incrementing the counter in global.asax. But how to pass it to homepage or webpage.

            R 1 Reply Last reply
            0
            • Y Yuwraj

              Sir, I got it by incrementing the counter in global.asax. But how to pass it to homepage or webpage.

              R Offline
              R Offline
              rizwan afsar
              wrote on last edited by
              #6

              keep that variable in session object ex Session["Counter"]=i.ToString(); Rizwan Afsar Associate Member, Technical Team IAP Company Ltd, Gurgaon INDIA www.iap-online.com "A winner is not the one who never fails, But one who NEVER QUITS"

              1 Reply Last reply
              0
              • Y Yuwraj

                I am developing a web application in ASp.net, for that I want the number of hits on the site. pl'z help me :^)

                S Offline
                S Offline
                sandeep_thakur
                wrote on last edited by
                #7

                In Global.asax file write the following code Application["counter"]=0 Now write the code on the form load Application["counter"]= (int)Application["counter"] + 1 Label1.text = "You are visitor no = " + Application["counter"] Enjoy

                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