Hi, I'm using the following to change a text label in a specific
row/control. This works great until I click the Edit commandfield. then
RowDataBound can't find the Label control because it is now a Textbox.
How do I indicate the using this code ONLY in ItemTemplate mode?
If e.Row.RowType = DataControlRowType.DataRow Then
Dim lbl As Label = CType(e.Row.FindControl("UserName"), Label)
If lbl.Text = "" Then 'should be blank in only one row
Thanks!
KB
*** Sent via Developersdex http://www.developersdex.com ***