|
 |
asp_web_howto thread: Session Variables and Arrays
Message #1 by thekman@w... on Tue, 24 Jul 2001 20:03:38
|
|
Hello.
Quick question - is there a way to store an array inside a session
variable? I would hope there is, since I'm at a loss as to another way to
solve the problem that I'm having. This is the code I've tried to use:
mySubmit = Request.Form("mySubmit")
If mySubmit = "Back" Or mySubmit = "Forward" Then
Dim Preserve Session("arVac(1,31)")
Dim Preserve Session("arDate(1,31)")
Session("status") = "change"
Session("resCount") = rescount
For i = 1 to resCount
arVac(1,i) = cInt(arVac(1,i))
vacationInstance = cInt(vacationInstance)
Session("arVac(1,i)") = arVac(1,i)
Session("arDate(1,i)" = arDate(1,i)
Next
Response.Redirect "request.asp"
End If
When I try to run this, I get an error that says 'Expected Identifier'.
Does anyone know how to resolve this? Thanks in advance!
Ted Hekman
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 25 Jul 2001 12:41:27 +1000
|
|
One method:
session("mySessionArray") = myLocalArray
myLocalArray = session("mySessionArray")
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: <thekman@w...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Tuesday, July 24, 2001 8:03 PM
Subject: [asp_web_howto] Session Variables and Arrays
: Hello.
: Quick question - is there a way to store an array inside a session
: variable? I would hope there is, since I'm at a loss as to another way to
: solve the problem that I'm having. This is the code I've tried to use:
:
: mySubmit = Request.Form("mySubmit")
: If mySubmit = "Back" Or mySubmit = "Forward" Then
: Dim Preserve Session("arVac(1,31)")
: Dim Preserve Session("arDate(1,31)")
: Session("status") = "change"
: Session("resCount") = rescount
: For i = 1 to resCount
: arVac(1,i) = cInt(arVac(1,i))
: vacationInstance = cInt(vacationInstance)
: Session("arVac(1,i)") = arVac(1,i)
: Session("arDate(1,i)" = arDate(1,i)
: Next
: Response.Redirect "request.asp"
: End If
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |