Click here to Skip to main content
15,892,059 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: asp.net 2.0 Pin
ToddHileHoffer14-Jun-06 3:53
ToddHileHoffer14-Jun-06 3:53 
QuestionDomCompareValidator Problem Pin
Praveen_S14-Jun-06 3:35
Praveen_S14-Jun-06 3:35 
AnswerRe: DomCompareValidator Problem Pin
Mircea Grelus14-Jun-06 8:42
Mircea Grelus14-Jun-06 8:42 
QuestionReapreter control problem Pin
Nagraj Naik14-Jun-06 3:34
Nagraj Naik14-Jun-06 3:34 
AnswerRe: Reapreter control problem Pin
Elina Blank14-Jun-06 4:28
sitebuilderElina Blank14-Jun-06 4:28 
GeneralRe: Reapreter control problem Pin
Nagraj Naik14-Jun-06 19:04
Nagraj Naik14-Jun-06 19:04 
GeneralRe: Reapreter control problem Pin
Elina Blank15-Jun-06 3:27
sitebuilderElina Blank15-Jun-06 3:27 
QuestionCount Visitors Pin
TheEagle14-Jun-06 3:26
TheEagle14-Jun-06 3:26 
Hi..
I know how to use the application and session state variables and i have used the following code :
(In the Global.asax Smile | :)
protected static int m_ActiveUsers;
public static int ActiveUsers
{
get
{ return m_ActiveUsers;
}
}
protected void Application_Start(Object sender, EventArgs e)
{

Application.Lock();
m_ActiveUsers=0;
Application.UnLock();

}
protected void Session_Start(Object sender, EventArgs e)
{
Application.Lock();
++m_ActiveUsers;
Application.UnLock();
}
protected void Session_End(Object sender, EventArgs e)
{
Application.Lock();
--m_ActiveUsers;
Application.UnLock();
}

But the problem it doesnt give me the right number always.Some times this code tells me there is two visitors while there is no one except me.And some times it doesnt decrement the visitors count number when i exit.

Do any one know how to make a better way that wont be affected by application errors and will solve my problem?Confused | :confused:

"I am too late but i will never give up"
AnswerRe: Count Visitors Pin
amaneet14-Jun-06 4:04
amaneet14-Jun-06 4:04 
GeneralRe: Count Visitors Pin
TheEagle14-Jun-06 4:15
TheEagle14-Jun-06 4:15 
AnswerRe: Count Visitors Pin
murtaza dhari14-Jun-06 6:37
murtaza dhari14-Jun-06 6:37 
GeneralRe: Count Visitors Pin
TheEagle14-Jun-06 18:26
TheEagle14-Jun-06 18:26 
Questionrename the file in vb.net 1.1 Pin
amaneet14-Jun-06 3:08
amaneet14-Jun-06 3:08 
Questionasp:Table Problem Pin
Brendan Vogt14-Jun-06 3:06
Brendan Vogt14-Jun-06 3:06 
AnswerRe: asp:Table Problem Pin
ToddHileHoffer14-Jun-06 4:01
ToddHileHoffer14-Jun-06 4:01 
GeneralRe: asp:Table Problem Pin
Brendan Vogt15-Jun-06 0:20
Brendan Vogt15-Jun-06 0:20 
QuestionHow to Implement Free Text Search in ASP.NET 2.0 Pin
VenkataRamana.Gali14-Jun-06 3:04
VenkataRamana.Gali14-Jun-06 3:04 
Questionsql to xml Pin
ritu432114-Jun-06 2:54
ritu432114-Jun-06 2:54 
AnswerRe: sql to xml Pin
sasidar_d14-Jun-06 3:54
sasidar_d14-Jun-06 3:54 
Questionbitmap class in vb.net [modified] Pin
amaneet14-Jun-06 2:41
amaneet14-Jun-06 2:41 
QuestionConnection Error, I can not solve Pin
Wael Inaim14-Jun-06 2:39
Wael Inaim14-Jun-06 2:39 
AnswerRe: Connection Error, I can not solve [modified] Pin
VenkataRamana.Gali14-Jun-06 3:23
VenkataRamana.Gali14-Jun-06 3:23 
GeneralRe: Connection Error, I can not solve Pin
Wael Inaim14-Jun-06 20:22
Wael Inaim14-Jun-06 20:22 
GeneralRe: Connection Error, I can not solve Pin
Wael Inaim14-Jun-06 21:53
Wael Inaim14-Jun-06 21:53 
QuestionWeb app not closing database connection? [modified] Pin
kbalias14-Jun-06 2:33
kbalias14-Jun-06 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.