ASP.NET 1.1: How to dynamically create data entry form?

  • Thread starter Thread starter Gino Perruti
  • Start date Start date
G

Gino Perruti

I am converting an old ASP data entry form to ASP.NET 1.1. The old form has
a script block that dynamically adds rows to a table that contain cells with
a textbox for quantity, product description, price, and total (which is
calculated after the form is submitted). The number of rows depends on how
many records were retrieved from a query.

<%
dim i: i = 0
with rs
do while .eof = false
i = i +1
response.write "<tr><td><input type=""text"" id=""" & "lineQty" &
cstr(i) & """ value=""" & cstr(order_array(i , 1)) & """></td><td id=""" &
"prodDesc_" & cstr(rs("prod_id")) & """>" & rs("prod_desc") & "</td><td
id=""" & "unitCost" & cstr(i)& """>" & cstr(rs("prod_unit_cost")) &
"</td><td id=""" & "lineTotal" & cstr(i) & """>" & cstr(order_array(i, 3)) &
"</td></tr>"
.movenext
loop
end with
%>

When the form is submitted, an array that contains the quantities, prices,
and totals are calculated from the values entered in the form. Piece of
cake in classic ASP. How on Earth do I do the same kind of thing in ASP.NET
1.1?

Can someone please point me to a *complete* example of the code to do this
(preferably in VB)? All I have come across in the newsgroups are vague,
philosophical discussions or partial snippets that don't explain it clearly
enough (or just don't work). I confess, I haven't gotten past the 30th page
or so in Google, but I need to figure this out in very short order now.

Thanks!

Gino
 
Back
Top