Hi,
I've a problem with trying to retrieve a session variable in an include file.
Basically, the main asp creates a session variable:
<% Session("var1") = "Hello" %>
And then when I click on a button it refers to the include file, which I
believe is all client-side code as there are no server <% %> tags.
I want to be able to use this session variable in the include file, how do I
do this?
If I try retrieving this session variable with Session("var"), it will come
up with an error saying that it has a type mismatch 'Session'.
The session state is enabled in IIS manager and appears to be working with
the other session variables in asp's not written with the server tags <% %>.
The include file has the .asp extension and has two language sections and I
want to use the session variable within the vbscript language tag like this:
<Script Language="JavaScript">
...
...
...
</Script>
<Script Language="VBScript">
If Not Session("Var") Then
...
...
End If
</Script>
I'm getting the type mismatch: "session" error on the IF block in the above
sample.
Thanks for your help in advance,
Eric.