Re: Users Counter
From: Kenny M. (KennyM_at_discussions.microsoft.com)
Date: 01/13/05
- Next message: Karl Seguin: "Re: DataBinding a ListBox's SelectedValue to integer field from DataSet gives error"
- Previous message: Rich Rekos: "Re: Send HTML Email from ASP.NET"
- In reply to: Do Quyet Tien: "Re: Users Counter"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 05:55:04 -0800
using that code I got the message:
"Sólo se pueden utilizar las expresiones de objeto assignment, call,
increment, decrement y new como instrucción"
"Do Quyet Tien" wrote:
> Why not code:
>
> Application.Lock();
> 1 + (int)Application["NumVisitors"];
> Application.UnLock();
>
> instead of:
>
> Application.Lock();
> Application["NumVisitors"] =
> int.Parse(Application["NumVisitors"].ToString()) + 1;
> Application.UnLock();
>
>
> "Kenny M." <KennyM@discussions.microsoft.com> wrote in message
> news:D012A6DE-3CF9-48A7-A7D0-D578CD7FB9DB@microsoft.com...
> > I want to control how many users there are login in my app
> >
> > I have the following code on Session_Start
> >
> > Application.Lock();
> > Application["NumVisitors"] =
> > int.Parse(Application["NumVisitors"].ToString()) + 1;
> > Application.UnLock();
> >
> > and Session_End
> >
> > Application.Lock();
> > Application["NumVisitors"] =
> > int.Parse(Application["NumVisitors"].ToString()) - 1;
> > Application.UnLock();
> >
> > I dont have a SignOut button on my App because users never press it, they
> > just go away or close the browser
> >
> > the conclusion The sessions are not being closed, actually en Debug mode I
> > never see the Session_End Event came up.
> >
> > Any idea or Link Where Can I Start?
> >
> > ken
> >
> > --
> > Kenny M.
>
>
>
- Next message: Karl Seguin: "Re: DataBinding a ListBox's SelectedValue to integer field from DataSet gives error"
- Previous message: Rich Rekos: "Re: Send HTML Email from ASP.NET"
- In reply to: Do Quyet Tien: "Re: Users Counter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|