|
-
Jun 11th, 2001, 09:24 AM
#1
Thread Starter
Hyperactive Member
Passing global variables from one ASP to another ASP
Is it possible to create a global variable? If so, how do I pass the variable from one page to another without adding it in the Request.Querystring? I hope this does not sound confusing. Thanks in advance.
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
-
Jun 11th, 2001, 09:49 AM
#2
Hyperactive Member
You can use a session variable.
Code:
session("myvariable") = 10
To reference it use:
Code:
newvariable = session("myvariable")
-
Jun 11th, 2001, 12:00 PM
#3
Frenzied Member
If by global variable, you mean one that is alive across all sessions, use an application variable and initialize it in your global.asa file. If you just mean a variable that is unique to each session but available on all pages during that session, then use a session variable. But be sparing on their use. They prevent a web app from scaling beyond one server. If this isn't a concern, then go nuts :c)
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Jun 11th, 2001, 12:12 PM
#4
Thread Starter
Hyperactive Member
Thanks!
Thank you both for your input. Since my web app will not be scaling beyong one server, and since I am only need one global variable for each unique session, then I am using the session variable.
Thanks Again!
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|