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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top