Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multidimential arrays ?

Status
Not open for further replies.

irate

Programmer
Jan 29, 2001
92
GB
Question one:

is it possible to make a 2d array in ASP?
ie. a set of paired values

Question two:

is it possible to then make that array a session?

I need to keep a set of paired values in session from a form, so if this is not possible can anyone think of a way to do this?

thanks in advance.
 
Try this:
Code:
dim array2D
dim sessionArray2D
redim array2D(1,2)

array2D(0,0) = "First Row, First Column"
array2D(1,0) = "First Row, Second Column"
array2D(0,1) = "Second Row, First Column"
array2D(1,1) = "Second Row, Second Column"
array2D(0,2) = "Third Row, First Column"
array2D(1,2) = "Third Row, Second Column"

session("arry2D") = array2D


sessionArray2D = session("arry2D")

Response.Write sessionArray2D(0,0)
Thanks,

Gabe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top