I'm creating a table using a DO WHILE. The INPUT objects are named by an increasing variable.
I'm using the GET method on the form and action is calling the same page.
Need to set the value of each textbox with Request.QueryString using a variable.

The following four lines produce the input textboxes. For the first LOOP qty_name = 101, value_name = 201, and total_name = 301. Each loop the variables will increase by one (i.e. 102, 202, 302):

Response.Write ("<td><center><input class=""entry"" type=""text"" id=" & qty_name & " name=" & qty_name & " maxlength=""4"" size=""4""></center></td>")
Response.Write ("<td><center><input class=""entry"" type=""text"" id=" & value_name & " name=" & value_name & " maxlength=""10"" size=""10""></center></td>")
cal_totcontribution = (request.querystring("&qty_name&") * request.querystring("&value_name&"))
Response.Write ("<td><center><input class=""display"" type=""text"" name=" &total_name&" size=""10"" value=" &cal_totcontribution& "></center></td></tr>")

The following line would work if I wasn't using a variable... any ideas on how to incorporate the following request.querystring part into the code above??

<td width="76"><input type="text" name="txtUnitPrice" size="10" value=<% =Request.QueryString("txtUnitPrice") %> ></td>

I do all my programming in PHP, however, I'm stuck making a new page for a friend and the server only has asp. I'm new to asp. The page I've build so far is at www.barbcpa.com/charitable.asp It creates a dropdown list of checkboxs. After submit button is clicked the table is filled with data from the selected checkboxes. I then need to allow user to calculate things on the table. Take a look...may make more sense.

This article has been dead for over six months. Start a new discussion instead.