p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: turning a local variable into a session one

Message #1 by "feroz khan" <feroz_77_city@h...> on Thu, 7 Mar 2002 02:38:02
From: "feroz khan" <feroz_77_city@h...>
Subject: [proasp_codeclinic] turning a local variable into a session one

: I am using a form for authentication which retrieves the value of the
: form named USERID from FILE 1 and assigns this to a local variable in
: FILE 2 called STRID1. Can I convert this local variable if the condition
: below meets and use it as a session variable which is assigned to another
: local variable as i have.

You cannot convert a local variable to a session variable. You have to
create a session variable and assign the value of the local variable to the
session variable:

Also you can't "assign a session variable to another local variable". You
can only assign *values*, not variables.

: Also how can i directly display the content of
: the session variable on screen as i only get a blank page.

Session("Test") = "foobar"

(in VBScript .Contents is the default property of the Session object, so you
can leave it out if you wish)


  Return to Index