chitra

chitra

  • NA
  • 34
  • 20.9k

How to count the page view in asp.net application

Sep 21 2011 1:30 AM
hi sir, i used the following program to count the page visitors, it counts correctly, wen the next day comes, it again start from 1.

<
script runat="server">



{
Application[
}


{
}


{
}


{
Application.Lock();
count =
Application[
Application.UnLock();
}


{
}
public static int count = 0;void Application_Start(object sender, EventArgs e) "myCount"] = count; void Application_End(object sender, EventArgs e) void Application_Error(object sender, EventArgs e) void Session_Start(object sender, EventArgs e) Convert.ToInt32(Application["myCount"]); "myCount"] = count + 1;void Session_End(object sender, EventArgs e) </
script>
i written this in global.asax file.

plz help any suggestion for doing this in any other way

Answers (1)