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
Gururaj Jewargi
NA
663
771.3k
Count of visitors visiting the website in asp.net Using C#
Nov 7 2016 5:58 AM
Hi Everyone,
Find the below code this code is not working exactly. whenever i visited website it showing count 11 after again showing count 10.
global.aspx
protected void Application_Start(object sender, EventArgs e)
{
Application["NoVisitors"] = 10;
}
protected void Session_Start(object sender, EventArgs e)
{
Application.Lock();
Application["NoVisitors"] = (int)Application["NoVisitors"] + 1;
Application.UnLock();
}
protected void Session_End(object sender, EventArgs e)
{
}
index.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblcount.Text = Application["NoVisitors"].ToString();
}
}
Reply
Answers (
1
)
How to hide column of Gridview when there is no data
How To Use GitHub