| 10:25 am on Dec 15, 2009 (gmt 0)|
Hi Andy, are you using Classic ASP or ASP.Net?
| 10:27 am on Dec 15, 2009 (gmt 0)|
Classic ASP, unfortunately ;)
| 11:34 am on Dec 15, 2009 (gmt 0)|
I'm trying the following to create an associative array from the query string:
set getArray = Server.CreateObject("Scripting.Dictionary")
For each Key in Request.QueryString
getArray.Add Key, Request.QueryString(Key)
Is this a reasonable method?
| 2:53 pm on Dec 15, 2009 (gmt 0)|
Why are you trying to put it in an dictionary object when Request.QueryString is a advanced collection object to begin with? You do not gain anything that I can think of by doing this?
Request.QueryString Collection [msdn.microsoft.com]
| 3:07 pm on Dec 15, 2009 (gmt 0)|
Thanks for the link :)
The two reasons for this are that the dictionary object allows me to remove individual items, and because I want to manipulate the data. I'd rather keep Request.QueryString as the raw data from the query string.
The code I'm using is to loop through the items, but removing one at the end of each loop, e.g. in an array of three items:
My troubles started when I could not find an easy way to remove items from an array in classic ASP. I'm afraid I'm used to PHP where there's a function to knock the last item off an array. Most probably, there is an entirely different approach I should be using.
| 5:01 am on Dec 17, 2009 (gmt 0)|
redim preserve myarray(ubound(myarray) - 1)
| 8:58 pm on Jan 14, 2010 (gmt 0)|
myarray = split(request.querystring(),"&")