faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems : Session Variables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 10 people (90%) answered Yes
Recently 6 of 7 people (86%) answered Yes

Entry

How do I set a session variable from within Python? All the obvious ways seem to not work.

Jul 22nd, 2000 23:38
unknown unknown,


You can use the SetValue method of the session object.  SetValue() takes
2 parameters - the variable name (a string) and the variable value.
Thus, the following code:
-- start of ASP snippet
<%
Session.SetValue('Key', 4)
%>
My custom session variable is <%= Session("Key") %>
-- end of asp snippet
will set the variable 'Key' to the integer value 4, and then print the
value to confirm the value is as we expect.



© 1999-2004 Synop Pty Ltd