Click to See Complete Forum and Search --> : Problem with application/session objects


luc83
07-08-2003, 08:00 PM
Hi,
I have very few experience with the application and session object. Anybody out there to help me?..
I saw in my book that there`s an event for the start of a session but I cant figure out how it work.

here is the code a wrote:

<%@language = VBScript%>
<%Option explicit%>
<%
dim arrUser, strUser

Sub Session_OnStart
application.contents("User") = application.contents("User") & "," & session.contents("Name")
End Sub

session.contents("Name") = request.form("User")

arrUser = split(application.contents("Usager"), ",")

%>

Ribeyed
07-09-2003, 03:51 AM
Hi,
just to add to Dave's answer. When you write this code in the global.asa you don't need the ASP <% and %> tags.

luc83
07-09-2003, 06:16 AM
I`ve already tried the Global.asa file and it dont work either. Do I need include for a .asa ??Well, I`ve tried that too...

Here is the code for my Global.asa:


<script language="vbscript" runat="server">

Sub Session_OnStart
Application.Lock
Application("visitors")=Application("visitors")+1
Application.UnLock
End Sub

</script>


Thats not the exact code in the subevent but you can see the syntax..