Hi, could you please tell me what is wrong with this piece of code.
I have a DataGrid, and I would like to know the value of a textbox field, and it never returns anything.
Thank you.
Steve
I have a DataGrid, and I would like to know the value of a textbox field, and it never returns anything.
Code:
Dim item As DataGridItem
If Not IsPostBack Then
For Each item In DataGrid1.Items
Dim tb As TextBox = CType(item.FindControl("txtInput"), TextBox)
ListBox1.Items.Add(tb.Text)
Next
End If
Thank you.
Steve