KeithWarren
12-13-2006, 06:29 AM
I have a query that pulls records from a database and puts the data into textboxes. I need the text boxes to have unique names such as text1,text2, text3, etc so that I can use the data later.
Here is the code I'm using.
<%i=0%>
<%SQL = "SELECT SphereAlloy FROM QuotedItemsQuery WHERE ([Email] = '" & Session("Email") & "' AND [RFQNumber] = " & Quote & " );"
SET RS = Conn.Execute(SQL)
While NOT RS.EOF
i=i+1%>
<input type="text" name="SphereAlloy<%=i%>" size="9" value="<%=RS("SphereAlloy")%>">
<%
RS.MoveNext
WEND
Set RS = NOTHING
%>
<%
Session("SphereAlloy1") = Request.Form("SphereAlloy1")
response.write Session("SphereAlloy1")
response.write i
%>
Everything works except the textbox name is not getting the numeric increment from i.
Response.write i shows the correct number, but response.write session("SphereAlloy1") shows nothing.
What am I doing wrong?
Here is the code I'm using.
<%i=0%>
<%SQL = "SELECT SphereAlloy FROM QuotedItemsQuery WHERE ([Email] = '" & Session("Email") & "' AND [RFQNumber] = " & Quote & " );"
SET RS = Conn.Execute(SQL)
While NOT RS.EOF
i=i+1%>
<input type="text" name="SphereAlloy<%=i%>" size="9" value="<%=RS("SphereAlloy")%>">
<%
RS.MoveNext
WEND
Set RS = NOTHING
%>
<%
Session("SphereAlloy1") = Request.Form("SphereAlloy1")
response.write Session("SphereAlloy1")
response.write i
%>
Everything works except the textbox name is not getting the numeric increment from i.
Response.write i shows the correct number, but response.write session("SphereAlloy1") shows nothing.
What am I doing wrong?