void Session_Start(object sender, EventArgs e) { Application.Lock(); Application["CurrentUsers"] = (int)Application["CurrentUsers"] + 1; Application.UnLock(); } void Session_End(object sender, EventArgs e) { Application.Lock(); if ((int)Application["CurrentUsers"] > 0) { Application["CurrentUsers"] = (int)Application["CurrentUsers"] - 1; } Application.UnLock(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)