Session Variables 
Author Message
 Session Variables

Does VBScript have any way of creating and maintaining state of Session variables?


Sat, 28 Jul 2001 03:00:00 GMT  
 Session Variables
Quote:

>Does VBScript have any way of creating and maintaining state of Session

variables?

Certainly:

In one ASP file:

    Dim myMessage
    myMessage = "Hello there"
    Session("HelloMessage") = myMessage

In another ASP file:

    Response.Write Session("HelloMessage")

Note that the code must be on the server (ASP code, either within <% %> or
<script> with the 'runat="server"' attribute specified).

Peter

--
Peter Torr, Developer / Webmaster, Vantage Systems Australia.



Sun, 29 Jul 2001 03:00:00 GMT  
 Session Variables
You can set a session variable from the client as follows
Client Page:
vbscript
window.location.href = "SetuserID.asp?userid=" & sUID

SetuserID.asp page


<%
 session("userid")=Request.QueryString("userid")
%>

So by setting a variable on one page via vbscript then calling another page
and passing the variable, you can set a sesison id.
Then just go on from there or do a browser back to get where you came from.

Daryl Leger
AIS

Quote:


>>Does VBScript have any way of creating and maintaining state of Session
>variables?

>Certainly:

>In one ASP file:

>    Dim myMessage
>    myMessage = "Hello there"
>    Session("HelloMessage") = myMessage

>In another ASP file:

>    Response.Write Session("HelloMessage")

>Note that the code must be on the server (ASP code, either within <% %> or
><script> with the 'runat="server"' attribute specified).

>Peter

>--
>Peter Torr, Developer / Webmaster, Vantage Systems Australia.




Mon, 06 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Splitting Session Variable into several variables (array?)

2. Type mismatch when comparing session variable to page variable

3. ASP - Session Variables and Querystrings

4. browser window size, set to a session variable?

5. What's so special with Session variables?

6. Setting ASP Session variable

7. Session Variables

8. Lost Session variables

9. Session Variables being lost

10. Session variable and check boxes

11. Session Variable

12. Access Session variables from within JScript include file

 

 
Powered by phpBB® Forum Software