[thelist] sorting an ASP form dump

Eric Engelmann eric.engelmann at geonetric.com
Tue Apr 23 17:02:01 CDT 2002


<snip>
what's a good way to sort a form dump like this alphabetically
and/or numerically?
</snip>

Oops, sorry for the blank one.

Are the fields pre-set, but with x of each? Like this:

1Header
1Body
1Footer
2Header
2Body
2Footer

If so, if you know the number of 'records' passed through, a loop would be
pretty straightforward, something like

For i = 1 to SomeNumber
	Response.Write Request.Form(i & "Header") & "<br>"
	Response.Write Request.Form(i & "Body") & "<br>"
	Response.Write Request.Form(i & "Footer") & "<br>"
Next

Or are they totally free-form? Ack, if so, you'd need to get it into an
array or dictionary and sort from there.

Is it possible to sort of just copy the Request.Form Collection into a
Dictionary object in one shot?





More information about the thelist mailing list