Charl Du Toit
|
| Posted: 12/19/2002, 2:03 AM |
|
Hi All
I want to show the number of users that are currently online. You would
normaly do the by adding the following code into global.asa
<script language="vbscript" runat = "server">
Sub Application_OnStart
'initialize variable
Application("visitors_online") = 0
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
Session.Timeout = 20 '20 minute timeout
Application.Lock
Application("visitors_online") = Application("visitors_online") + 1
Application.Unlock
End Sub
Sub Session_OnEnd
Application.Lock
Application("visitors_online") = Application("visitors_online") - 1
Application.Unlock
End Sub
</script>
You can then display the number of visitors online by using
There are currently <%=Application("visitors_online")%> visitor(s) online
How do you do this With CCS ?
Im using asp and ms access
Thanx for the help in advance
Charl
|
|
|
 |
DonB
|
| Posted: 12/19/2002, 5:42 PM |
|
I can't see why CCS would preclude adding a Global.asa to your website.
Should still work fine. It's "just asp" once it's deployed.
DonB
"Charl Du Toit" <charl@dkalmin.co.za> wrote in message
news:ats5gp$cs6$1@news.codecharge.com...
> Hi All
>
> I want to show the number of users that are currently online. You would
> normaly do the by adding the following code into global.asa
> <script language="vbscript" runat = "server">
> Sub Application_OnStart
> 'initialize variable
> Application("visitors_online") = 0
> End Sub
> Sub Application_OnEnd
>
> End Sub
>
> Sub Session_OnStart
> Session.Timeout = 20 '20 minute timeout
> Application.Lock
> Application("visitors_online") = Application("visitors_online") + 1
> Application.Unlock
> End Sub
> Sub Session_OnEnd
> Application.Lock
> Application("visitors_online") = Application("visitors_online") - 1
> Application.Unlock
> End Sub
> </script>
>
> You can then display the number of visitors online by using
>
> There are currently <%=Application("visitors_online")%> visitor(s) online
>
>
>
> How do you do this With CCS ?
>
> Im using asp and ms access
>
>
>
> Thanx for the help in advance
>
> Charl
>
>
>
>
|
|
|
 |
wizard
|
| Posted: 12/19/2002, 9:02 PM |
|
Do i just create a file called global.asa ?? Where do i put this file . Will
IIS c it automatically ? Shouldnt I rather add the code into one of CCS
common files ?
Regards
Charl
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:attshn$6fr$1@news.codecharge.com...
> I can't see why CCS would preclude adding a Global.asa to your website.
> Should still work fine. It's "just asp" once it's deployed.
>
> DonB
>
>
> "Charl Du Toit" <charl@dkalmin.co.za> wrote in message
>news:ats5gp$cs6$1@news.codecharge.com...
> > Hi All
> >
> > I want to show the number of users that are currently online. You would
> > normaly do the by adding the following code into global.asa
> > <script language="vbscript" runat = "server">
> > Sub Application_OnStart
> > 'initialize variable
> > Application("visitors_online") = 0
> > End Sub
> > Sub Application_OnEnd
> >
> > End Sub
> >
> > Sub Session_OnStart
> > Session.Timeout = 20 '20 minute timeout
> > Application.Lock
> > Application("visitors_online") = Application("visitors_online") + 1
> > Application.Unlock
> > End Sub
> > Sub Session_OnEnd
> > Application.Lock
> > Application("visitors_online") = Application("visitors_online") - 1
> > Application.Unlock
> > End Sub
> > </script>
> >
> > You can then display the number of visitors online by using
> >
> > There are currently <%=Application("visitors_online")%> visitor(s)
online
> >
> >
> >
> > How do you do this With CCS ?
> >
> > Im using asp and ms access
> >
> >
> >
> > Thanx for the help in advance
> >
> > Charl
> >
> >
> >
> >
>
>
|
|
|
 |
wizard
|
| Posted: 12/19/2002, 9:21 PM |
|
Thanx don look I just created a file in the application root called
global.asa . Then everything started workig !! Cool thanx
Charl
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:attshn$6fr$1@news.codecharge.com...
> I can't see why CCS would preclude adding a Global.asa to your website.
> Should still work fine. It's "just asp" once it's deployed.
>
> DonB
>
>
> "Charl Du Toit" <charl@dkalmin.co.za> wrote in message
>news:ats5gp$cs6$1@news.codecharge.com...
> > Hi All
> >
> > I want to show the number of users that are currently online. You would
> > normaly do the by adding the following code into global.asa
> > <script language="vbscript" runat = "server">
> > Sub Application_OnStart
> > 'initialize variable
> > Application("visitors_online") = 0
> > End Sub
> > Sub Application_OnEnd
> >
> > End Sub
> >
> > Sub Session_OnStart
> > Session.Timeout = 20 '20 minute timeout
> > Application.Lock
> > Application("visitors_online") = Application("visitors_online") + 1
> > Application.Unlock
> > End Sub
> > Sub Session_OnEnd
> > Application.Lock
> > Application("visitors_online") = Application("visitors_online") - 1
> > Application.Unlock
> > End Sub
> > </script>
> >
> > You can then display the number of visitors online by using
> >
> > There are currently <%=Application("visitors_online")%> visitor(s)
online
> >
> >
> >
> > How do you do this With CCS ?
> >
> > Im using asp and ms access
> >
> >
> >
> > Thanx for the help in advance
> >
> > Charl
> >
> >
> >
> >
>
>
|
|
|
 |