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. Counter Website C#

Counter Website C#

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomhelp
11 Posts 5 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.
  • J jojoba2010

    I wanna counter with ASP.net ( C# Coding ) for my website that gives me 1: Yesterday Visitors 2: Today Visitors 3: Online Visitors 4: Total Visitors I have seen this site http://www.asp101.com/samples/counter_aspx.asp but .... I can only have Total Visitors Please Help !!!!!!

    S Offline
    S Offline
    sashidhar
    wrote on last edited by
    #2

    for Visitors online see this..! http://www.aspdotnetfaq.com/Faq/How-to-show-number-of-online-users-visitors-for-ASP-NET-website.aspx[^]

    jojoba2010 wrote:

    Yesterday Visitors & Today Visitors

    write a logic in the session start event and compare with datetime..! and store it in database..!

    LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

    1 Reply Last reply
    0
    • J jojoba2010

      I wanna counter with ASP.net ( C# Coding ) for my website that gives me 1: Yesterday Visitors 2: Today Visitors 3: Online Visitors 4: Total Visitors I have seen this site http://www.asp101.com/samples/counter_aspx.asp but .... I can only have Total Visitors Please Help !!!!!!

      T Offline
      T Offline
      Tash18
      wrote on last edited by
      #3

      U have already posted the same question.. please dont cross post... You wont get replies for cross post.... Regards, Tash

      S 1 Reply Last reply
      0
      • T Tash18

        U have already posted the same question.. please dont cross post... You wont get replies for cross post.... Regards, Tash

        S Offline
        S Offline
        sashidhar
        wrote on last edited by
        #4

        I dont Know This is Cross Post..! :-O

        LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

        J T 2 Replies Last reply
        0
        • S sashidhar

          I dont Know This is Cross Post..! :-O

          LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

          J Offline
          J Offline
          jojoba2010
          wrote on last edited by
          #5

          What do you mean

          write a logic in the session start event and compare with datetime..!
          and store it in database..!

          But I didnt get my ans Yesterday Visitors Today visitors Online Visitors Total Visitors

          1 Reply Last reply
          0
          • S sashidhar

            I dont Know This is Cross Post..! :-O

            LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

            T Offline
            T Offline
            Tash18
            wrote on last edited by
            #6

            Thats okay.. If u have an answer u can help him out.. Mostly people dont reply for cross posts... anyways opinions vary.. Regards, Tash

            J 1 Reply Last reply
            0
            • T Tash18

              Thats okay.. If u have an answer u can help him out.. Mostly people dont reply for cross posts... anyways opinions vary.. Regards, Tash

              J Offline
              J Offline
              jojoba2010
              wrote on last edited by
              #7

              Thanks a lottttt How can i do that

              write a logic in the session start event and compare with datetime..!
              and store it in database..!

              I wanna :

              Yesterday Visitors
              Today visitors
              Online Visitors
              Total Visitors
              

              modified on Tuesday, January 12, 2010 4:52 AM

              A 1 Reply Last reply
              0
              • J jojoba2010

                Thanks a lottttt How can i do that

                write a logic in the session start event and compare with datetime..!
                and store it in database..!

                I wanna :

                Yesterday Visitors
                Today visitors
                Online Visitors
                Total Visitors
                

                modified on Tuesday, January 12, 2010 4:52 AM

                A Offline
                A Offline
                Abhishek Sur
                wrote on last edited by
                #8

                Actually a website runs all the time. It doesnt restarts. So you need to calculate Yesterday visitor/ today Visitor manually by checking the DateTime Also Online visitor can be calculated by fixing a timeout and check all the last requests made during this timeout value. :rose:

                Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


                My Latest Articles-->** Windows7 API Code Pack
                Simplify Code Using NDepend
                Basics of Bing Search API using .NET

                J 1 Reply Last reply
                0
                • A Abhishek Sur

                  Actually a website runs all the time. It doesnt restarts. So you need to calculate Yesterday visitor/ today Visitor manually by checking the DateTime Also Online visitor can be calculated by fixing a timeout and check all the last requests made during this timeout value. :rose:

                  Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


                  My Latest Articles-->** Windows7 API Code Pack
                  Simplify Code Using NDepend
                  Basics of Bing Search API using .NET

                  J Offline
                  J Offline
                  jojoba2010
                  wrote on last edited by
                  #9

                  Thanks anyway but

                  Can you give me example or code .

                  I should finish my project for this Wednesday.

                  So please give me code or pdf or C# example

                  .

                  Step by Step code .

                  Thanksss:rose::rose: :(( :(( :confused::confused:

                  1 Reply Last reply
                  0
                  • J jojoba2010

                    I wanna counter with ASP.net ( C# Coding ) for my website that gives me 1: Yesterday Visitors 2: Today Visitors 3: Online Visitors 4: Total Visitors I have seen this site http://www.asp101.com/samples/counter_aspx.asp but .... I can only have Total Visitors Please Help !!!!!!

                    S Offline
                    S Offline
                    Shivendra Pandey
                    wrote on last edited by
                    #10

                    create table in database CREATE TABLE [ApplicationCount1] ( [HitID] [bigint] IDENTITY (1, 1) NOT NULL , [AddedDate] [datetime] NULL , [HitCount] [bigint] NULL , ) ON [PRIMARY] GO Create Procedure to Add Hit alter procedure usp_Hit1 as declare @CurrentID bigint declare @AddedDate datetime set @CurrentID=0 set @AddedDate=CONVERT(char(12), GETDATE(), 101) Select @CurrentID=HitID from ApplicationCount1 where Addeddate=@AddedDate if @CurrentID>0 update ApplicationCount1 Set HitCount=HitCount+1 where HitId=@CurrentID else insert into ApplicationCount1 values(CONVERT(char(12), GETDATE(), 101),1) Now on Session Start Call This Procedure now in database u have datewise count now u can use it to display number of hit for any day

                    J 1 Reply Last reply
                    0
                    • S Shivendra Pandey

                      create table in database CREATE TABLE [ApplicationCount1] ( [HitID] [bigint] IDENTITY (1, 1) NOT NULL , [AddedDate] [datetime] NULL , [HitCount] [bigint] NULL , ) ON [PRIMARY] GO Create Procedure to Add Hit alter procedure usp_Hit1 as declare @CurrentID bigint declare @AddedDate datetime set @CurrentID=0 set @AddedDate=CONVERT(char(12), GETDATE(), 101) Select @CurrentID=HitID from ApplicationCount1 where Addeddate=@AddedDate if @CurrentID>0 update ApplicationCount1 Set HitCount=HitCount+1 where HitId=@CurrentID else insert into ApplicationCount1 values(CONVERT(char(12), GETDATE(), 101),1) Now on Session Start Call This Procedure now in database u have datewise count now u can use it to display number of hit for any day

                      J Offline
                      J Offline
                      jojoba2010
                      wrote on last edited by
                      #11

                      Thanks a lot no no

                      thanks more than a lot.
                      
                      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