G
Guest
Hi,
I have a datagrid with a label in the first column (the key basically).
The issue is, that on pressing a standard button outside the datagrid (ie
not one per row) I can SET, but cannot READ the text of the label. I want to
READ the value too!!!
I've copied the basics below, from the contents of the button...
For Each FilmGridItem In dgrdList.Items
Dim lblID As Label = CType(FilmGridItem.Cells(0).Controls(1), Label)
'Dim lblID As Label = CType(FilmGridItem.FindControl("lblTitleID"),
Label)
'(above has same effect)
'I cant read the value on the next line - it is ""
Response.Write(lblID.Text)
'But I can set it!
lblID.Text = "Set the value"
Next
Any ideas?
Thanks.
nb .net 1.1
I have a datagrid with a label in the first column (the key basically).
The issue is, that on pressing a standard button outside the datagrid (ie
not one per row) I can SET, but cannot READ the text of the label. I want to
READ the value too!!!
I've copied the basics below, from the contents of the button...
For Each FilmGridItem In dgrdList.Items
Dim lblID As Label = CType(FilmGridItem.Cells(0).Controls(1), Label)
'Dim lblID As Label = CType(FilmGridItem.FindControl("lblTitleID"),
Label)
'(above has same effect)
'I cant read the value on the next line - it is ""
Response.Write(lblID.Text)
'But I can set it!
lblID.Text = "Set the value"
Next
Any ideas?
Thanks.
nb .net 1.1