How read values form dynamic generated TextBoxes in table after ButtonClick.

bwk

New member
Joined
Jul 26, 2011
Messages
1
Programming Experience
Beginner
Can somebody advise me how I can do it?
Thank you very much

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

? how read value from textBoxes
1. find all boxes on page and read these values
2. when I will know ID of textboxes

End Class

..... server code

comm = New OdbcCommand(sql, ODBCConnection)
dr = comm.ExecuteReader()

While (dr.Read())
Dim tRow As New TableRow()

Dim tCellp As New TableCell()
Dim tBox As New TextBox() <---- here I create dynamic control into table cell
tBox.Text = dr.GetValue(0).ToString()
tBox.ID = dr.GetValue(5).ToString()
tCellp.Controls.Add(tBox)
tCellp.CssClass = "tabtd"
tRow.Cells.Add(tCellp)
Table1.Rows.Add(tRow)
End While

..... part client page source

<input name="000018612826" type="text" value="?" id="000018612826" /></td><td class="tabtd">AA1</td>class="tabtd"></td><td class="tabtd"></td>
......
 
Top Bottom