Can i create a specific counter module for my website??
Sorry because i mind so much!! My problem is i want to create a component to count a person visited and online for my website.I mean i want to create and add my component into Toolbox and drag it into my site.I can do it??Somebody know the article or code to do it.Please help me!
viet vo quocPosted Nov 2, 2011, 12:16 PM
Javeed M ShaikhPosted Nov 2, 2011, 12:12 PM
void Application_Start(object sender, EventArgs e)
{
Application["OnlineUsers"] = 0;
Application["PersonVisited"] = 0;
}
void Session_Start(object sender, EventArgs e)
{
Application.Lock();
Application["OnlineUsers"] = (int)Application["OnlineUsers"] + 1;
Application["PersonVisited"] = (int)Application["PersonVisited"] + 1;
Application.UnLock();
}
void Session_End(object sender, EventArgs e)
{
Application.Lock();
Application["OnlineUsers"] = (int)Application["OnlineUsers"] - 1;
Application.UnLock();
}