I'm about to start a small web app and wasn't sure how to go about doing something. I have a SQL Table called TD Codes with two columns, TD Description and TD code. There are about 100+ entries in this table.
What I want to do is have a datasource that populates a table with a 2 columns. The first column will be the the TD Description, and the second column will be a textbox for each TD Description. The goal of the app is to let the user enter a number in the textbox for each TD Description and then submit it to a table in the database.
I'm not sure how to go about doing this. I know that theres a datagrid, but I'm not sure how to do some sort of foreach Insert statement for each row of the table.
basically the goal would be on submit button click:
foreach (row in table)
{ INSERT into table (TD_CODE, TotalNumber) values (Column 1(TD Description), Column 2 (TextBox))
} ...
Go to the complete details ...