[thelist] ASP.NET: For Each Item In...
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Tue Jul 18 13:45:42 CDT 2006
Coll(arr1(loop1)) should do it... or something close to that.
Then again, wouldn't it be easier just to iterate through the Request.Form collection as is (without slamming it into an array)?
Peter
From: "Casey Crookston" caseyc at IntelliSoftmn.com
(Good grief - I replied to the wrong thread. Sorry for the mix up...)
Thanks Anthony,
This gave me a good start. Here's the code I'm now using:
Dim loop1 As Integer
Dim arr1() As String
Dim coll As NameValueCollection
' Load Form variables into NameValueCollection variable.
coll = Request.Form
' Get names of all forms into a string array.
arr1 = coll.AllKeys
For loop1 = 0 To arr1.GetUpperBound(0)
lbl_submit.Text &= arr1(loop1) & "
"
Next loop1
Which returns the id's of each item in the form. Now I need to play
around and figure out how to return the values...
Casey
More information about the thelist
mailing list