Okay, here's my problem:
I need to populate different fields in an HTML table with TextBoxes. For
example, if I had 3 columns "Name", "Address", and "City"; I need to have a
TextBox in all of the Address fields. This is basically the code that I used.
<script language="VB" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Label1.Text &= "<td align=left><input type=""text"" id=""txt"
& _
Database.ReadField("ID") & _
""" runat=server value=""" & _
Database.ReadField("Address") & """></td>"
End Sub
Sub Update_Click(Sender As Object, E As EventArgs)
Dim dba As DatabaseDLL = New DatabaseDLL
dba.LoadDB_SQL(Server.MapPath("address.mdb"), False, sql)
Do While Not dba.EOF
strRead = Request.Form("txt" & dba.ReadField("ID"))
If strRead <> "" Then
dba.EditField("JobCost", strRead)
dba.Update()
End If
dba.MoveNext()
Loop
dba.CloseDB()
End Sub
</script>
<form runat="server">
<asp:label id="Label1" runat="server">
Edit Subtotals:<br><br>
<a href="view_all_estimate.aspx">Back to Standard View</a><br><br>
</asp:label>
<input type="submit" runat="server" id="cmdSubmit"
onServerClick="Update_Click" value="Update Material Costs">
</form>
But when I press Submit, it obviously does not pick up those TextBoxes that
I added at runtime. How am I supposed to do this?