G
Guest
I'm using a table (dynamically generated at runtime) for formatting wherein I have text in the first column, and textboxes in the second column. For example, (1,1) might have the string "Last Name" and (1,2) has a textbox where the user can type the last name; (2,1) "First Name", and (2,2) a textbox, and so forth. The code to it is:
dim table_test As System.Web.UI.WebControls.Table
For rowCount = 0 To 3
Dim column1 As New TableCell()
Dim column2 As New TableCell()
Dim row As New TableRow()
column1.Controls.Add(New LiteralControl("something"))
column2.Controls.Add(New TextBox())
row.Cells.Add(column1)
row.Cells.Add(column2)
table_test.Rows.Add(row)
Next
Once the table is generated, and presented, how can I fetch the contents of the textboxes in the second column? The following does not work because I don't want the text within the cell, I want the text within the textbox within the cell (I'm assuming the rows and cells are zero origined, I might be wrong):
dim s as string
s = table_test.rows(0).cells(1).text
Any suggestions will be greatly appreciated!
dim table_test As System.Web.UI.WebControls.Table
For rowCount = 0 To 3
Dim column1 As New TableCell()
Dim column2 As New TableCell()
Dim row As New TableRow()
column1.Controls.Add(New LiteralControl("something"))
column2.Controls.Add(New TextBox())
row.Cells.Add(column1)
row.Cells.Add(column2)
table_test.Rows.Add(row)
Next
Once the table is generated, and presented, how can I fetch the contents of the textboxes in the second column? The following does not work because I don't want the text within the cell, I want the text within the textbox within the cell (I'm assuming the rows and cells are zero origined, I might be wrong):
dim s as string
s = table_test.rows(0).cells(1).text
Any suggestions will be greatly appreciated!