Hi all,
I am trying to use an array to hold the varable names Drop1, Drop2, Drop3, Drop4, Drop5 and Drop6. I then want to use Response.Write to display the values of the variable names which have already been input. The problem that I am getting is that when I write the array using
Response.Write StrDropDownArray(1,counter) I get the variable name ond not the value of the appropriate variable. Does anyone know how that I can get the value from the variable using the array method.
The code that I am using is shown below.
Code:
<%
DIM NumberDropDowns, Drop1, Drop2, Drop3, Drop4, Drop5, Drop6, counter, StrDropDownArray
NumberDropDowns = 6
Drop1 = "Menu 1"
Drop2 = "Menu 2"
Drop3 = "Menu 3"
Drop4 = "Menu 4"
Drop5 = "Menu 5"
Drop6 = "Warranty,Tech Support,Seminars,Locations,Web Master"
REDIM StrDropDownArray(NumberDropDowns,20)
For counter = 1 to NumberDropDowns
StrDropDownArray(1,counter) = "Drop" & counter
Next
For counter = 1 to NumberDropDowns
Response.Write "counter"& counter &" = "& StrDropDownArray(1,counter) & "<br>"
Next
%>
Thanks
Graham