Session variable as string (array)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a web project in Visual Basic 2005. I want to create a session
variable in the "global.asax" file as an array of strings type. The syntax I
use is the following:

Session("MyArray")(10, 10) = ""

but I get an error. I think that I don't know the syntax correctly. Someone
knows it?
Thanks, John.
 
Just declare the variables as you normally do then set it to the session
object

Session("MyArray")=VarHoldingArray

to read it from session

VarHoldingArray=Session("MyArray")

regards


Michel Posseth
 
Juan,

I don't think that it is clever to update the array in the session.
Why don't you not as Michel tells you in fact do that outside that and add
that than again to the session.

Just my thought,

Cor
 
I don't want to update de array in the session. Only say to Visual Basic 2005
that the variable is really an array with 2 dimensions of 10 elements each. I
use this syntax:

Session("MyArray")(10, 10) = ""

Regards, John
 
Dim varHoldingArray(10, 10) As String
Session("MyArray") = varHoldingArray

from our response you could have find the above solution



regards

Michel Posseth [MCP]
 
Back
Top