Hi,
How to count total number of page view in a web page in asp.net ?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Aug 10, 2011, 1:38 AM EDT
below is the code or run the attachments.
Default.aspx code
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Default.aspx.vb code
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim result As Integer
result = Convert.ToInt32((Application("usercount")))
Label1.Text = Convert.ToString(result)
If (result < 10) Then
Label1.Text = "000" + Label1.Text
ElseIf (result < 100) Then
Label1.Text = "00" + Label1.Text
ElseIf (result < 1000) Then
Label1.Text = "0" + Label1.Text
End If
End Sub
End Class
Global.asax code
<%@ Application Language="VB" %>
Thanks
If the post helps you please mark it as answer
Satyapriya NayakRank #47 · 31.5K reputationPosted Aug 11, 2011, 10:45 AM EDT
If this post helps you mark it as answer
Thanks