Is it possible to make a control array in ASP similiar to
a control array in VB? I am trying to show a table that
displays several fields for different people. My goal is
to try to allow the user to update several fields in the
database without have to press an update button after
every update.
The number of people in the database could be from 1 -
1000. Here is a quick sketch of what I want to do.
code:-----------------------------------------------------
---------------------------
Name Favorite Color Birthday
Mike Smith Blue 10/7/82
Jim Beam Red 9/15/90
--Update Button--
----------------------------------------------------------
----------------------
When the update button is pressed I want to be able to
update the changes to both Mike and Jim. It just seems
repetitive to keep pressing update for each user. I don't
think it would be hard if I could make the favorite color
and birthday text boxes an array. Is this possible? If
not, have any other suggestions?
The other thing that I was thinking of is creating the
text boxes for each field in a for loop like this:
code:-----------------------------------------------------
---------------------------
for i = 1 to 2
response.write "<INPUT type="text" name=color" & i
& ">"
next
----------------------------------------------------------
----------------------
This would generate a color1 and color2 text box. But the
problem I ran into is that I can request these values.
Here is the code I tried:
code:-----------------------------------------------------
---------------------------
for i = 1 to 2
data = "color" & i
data = Request(data)
response.write "!" & data & "! <BR>"
next
----------------------------------------------------------
----------------------
All that was printed on the screen was two sets of !!.
The request wouldn't work when I used a variable instead
of a constant.
Any suggestions would be greatly appreciated. Thanks for
the help.