<%
i = 1
product1 = Request.Form("product" & i)
%>
i wanna receive the variable name "product1" by putting "product" and i together.
The above code tho doesn't work. Any ideas?
Thanks
Nick
Printable View
<%
i = 1
product1 = Request.Form("product" & i)
%>
i wanna receive the variable name "product1" by putting "product" and i together.
The above code tho doesn't work. Any ideas?
Thanks
Nick
Hi nick
Have you got the Input's inclosed within a form tag, as you need it to be able pass it through and that you submit it ? ie.
<form name="Form1" Method="GET" Action="Myasppage.asp">
<Input type="Text" name="Product1">
<Input type="Submit" value="Post Values">
</form>
Ian :)
i can receive the variable "product1"
but what i wanna do is put a count in
<%
i = 1 to 10
product & i = Request.Form("product" & i)
next
%>
so that it recieves products 1 to 10 and puts them in variables 1 to 10.
Is this possible?
Nick
the above is your problem, as you cannot ass concatenate to make a variable. What I would suggest you do, is store the variables into an array ie.Quote:
Originally posted by nswan
i can receive the variable "product1"
product & i = Request.Form("product" & i)
<%
Dim Products
ReDim Products(9)
i = 1 to 10
products(iflag -1) = Request.Form("product" & i)
next
%>
that would be cool.....
but the
Request.Form("product" & i)
doesn't seem to work. It just request "product"
i tell a lie.....it works okay!!
Thanks mate
np, was just about to reply with there shouldn't be anything wrong with that code :)