View Full Version : Passing Array in QueryString
Bobba Buoy
06-22-2004, 12:43 PM
Is this possible? I have a 2-dimensional dynamic array that I want to pass to a page. If so, what is the syntax?
Thanks!
Bobba Buoy
06-22-2004, 12:52 PM
Oops-in ASP. Actually I thought that a QueryString was just an ASP thing-shows what I know but that is all I work in server side.
agent002
06-22-2004, 03:05 PM
I believe this belongs to Server Side Programming, I'll move it... to answer the question, I would maybe specify all array values using coordinates, let's say I have a 2x2 two dimensional array with
[0][0] = "banana"
[0][1] = "apple"
[1][0] = "orange"
[1][1] = "kiwi"
I would pass it with a query string looking like this:
filename.asp?0.0=banana&0.1=apple&1.0=orange&1.1=kiwi
Bobba Buoy
06-22-2004, 03:06 PM
Thanks! I will give it a try!!!
putts
06-22-2004, 09:05 PM
Dang! that's a lot of work to pass an array :D
me, personally, would send it as an array string deilimitted by commas or whatever your preference is then slice it on the other side - to do a multi-dimensional you'd have to use two different delimitters.
Not sure the specific use you're going for but is a Session variable another possibility?
Bobba Buoy
06-22-2004, 09:09 PM
Actually what I ended up doing was passing 5 querystrings based on the array values. Can you folks comment on what you think about that from a programming guidelines standpoint or processing or whatever?
putts
06-23-2004, 05:46 AM
well, it'd help if I knew exactly what and why you were passing through the querystring.
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.