Response.write "<input type = 'text' name = 'text" & rs("fld") & "' value =
'somevalue'>"

What u might be doing wrong is the
imporoper usage of the quotes.


HTH
Roji


----- Original Message -----
From: "msavoy" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Monday, October 07, 2002 6:17 PM
Subject: RE: Question on Appending to name of input field


> Thanks for the replay however, please note, the code is already in
> VBScript and I had tried appending the iCounter variable to this name
> field by doing the following:
>
> <input name='text&iCounter'> and when I did a view source I got the
following I got <input name='text&iCounter'> instead of seeing
> text1 and then text2 accordingly.
>
> What am I doing wrong?  Any additional suggestions or direction would be
> appreciated.
>
>
> > <input name="text<%= variablename %>">
> >
> > -----Original Message-----
> > From: msavoy [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 5:32 PM
> > To: ActiveServerPages
> > Subject: Question on Appending to name of input field
> >
> >
> > Is there a way within my ASP code to append a variable to the name of an
> > input field? I am building a table on the fly depending on what products
> > are being selected from a dropdown box.  The code for the table I am
> > working with is as follows (THANKS IN ADVANCE FOR ANY HELP!!):
> >
> > '***** SP to build the product by Apologetic products table. *****
> > strSQLStatement = "Get_Apologetics_Products_By_Customer " &
intCustomer_id
> >
> > Set rs = XLMconn.Execute(strSQLStatement)
> >
> > '***** Setup the variable to ensure empty before populating. *****
> > strcustApologetic = ""
> > '***** Build the Apologetic products table associated with this customer
> > and where user can add or delete product. *****
> > If Not rs.EOF Then
> > strApologetic_table = "<TABLE width='575' align='left' border='1'
> > cellpadding='2' cellspacing='0'>"
> > strApologetic_table = strApologetic_table & "<tr>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<th><font face='arial'
> > size='2'>Remove Product</font></th>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<th><font face='arial'
> > size='2'>Product:</font></th>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<th><font face='arial'
> > size='2'>Qty.:</font></th>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<th><font face='arial'
> > size='2'>Suggested Donation Amt.:</font></th>" &
> > vbCRLF
> > strApologetic_table = strApologetic_table & "<th><font face='arial'
> > size='2'>Check To Donate</font></th>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<th><font face='arial'
> > size='2'>Your Donation Amt.:</font></th>" & vbCRLF
> > strApologetic_table = strApologetic_table & "</tr>" & vbCRLF
> >
> > '***** Start loop for all products associated with the customer_id.
*****
> > Do While Not rs.EOF
> > strApologetic_table = strApologetic_table & "<tr>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<td align='center'
> > valign='middle'><input type='checkbox' name='delete_checked_product'
> > value='" & rs("product_id") & "'></td>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<td align='left'
> > valign='middle'><font face='arial' size='2'>" &
> > trim(rs("product_description")) & "</font></td>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<td align='center'
> > valign='middle'><input type='text' name='product_qty' value='1'
> > size='5'></td>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<td align='right'
> > valign='middle'><font face='arial' size='2'>" &
> > rs("product_donation_amt") & "</font></td>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<td align='center'
> > valign='middle'><input type='checkbox' name='donate_checked_product'
> > value='" & rs("product_id") & "'></td>" & vbCRLF
> > strApologetic_table = strApologetic_table & "<td align='right'
> > valign='middle'><input type='text' name='your_product_donation_amt'
> > size='10'></td>" & vbCRLF
> > strApologetic_table = strApologetic_table & "</tr>" & vbCRLF
> >
> > '***** Set variable to a comma delimited string for using in the updated
> > stored procedure above. *****
> > strcustApologetic = strcustApologetic & rs("customer_id") & ", "
> > iCounter = iCounter + 1
> > rs.MoveNext
> > Loop
> > strApologetic_table = strApologetic_table & "</table>" & vbCRLF
> >
> > '***** Remove the comma at the end of the last record. *****
> > strcustApologetic = left(strcustApologetic, len(strcustApologetic) - 2)
&
> > " "
> > End If
> > rs.Close
> >
> > ---
> > You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> > %%email.unsub%%
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to