TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sankar
NA
28
18.9k
How to find total visitors in my website?
Dec 1 2011 2:31 AM
Hi ,
I want know how to find how many members visit my website and overall members visited my website in asp.net 2.0?
please help me my problem.I am always starting global.aspx coding
public static double count = 1000.0;
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
Application["OnlineUsers"] = count;
}
void Application_End(object sender, EventArgs e)
{
// Code that runs on application shutdown
}
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
}
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
Session["username"] = "";
Session["etype"] = "";
Application.Lock();
count = Convert.ToInt32(Application["OnlineUsers"]);
Application["OnlineUsers"] = count+ 1;
}
//Which page i want display visitors
protected void Page_Load(object sender, EventArgs e)
{
Application.Lock();
if (Application["HitCount"] != null)
{
Application["HitCount"] = (int)Application["HitCount"] + 1;
}
else
{
Application["HitCount"] = 1000;
}
Application.UnLock();
visitor.Value = Application["HitCount"].ToString();
}
But this coding using daily visitors only.But i want overall visitors in my website.
Please help me.
Reply
Answers (
4
)
Tandem DB Connection Driver for ASP.NET
How to enable ajax in asp.net 2.0?