[RESOLVED] [2005] FormView Control Format
I have a FormView with several DataBound labels. I need to change the ForeColor of one of the labels depending on it's value but can't seem to find a way of accessing it's properties since it is in a template. In tried using FindControl but didn't have any luck. Can someone suggest an alternate way of doing this? I have enough flexibility that I don't have to use a FormView if there is another way of binding the label (I am using an ObjectDataSource).
Thanks!!
Re: [2005] FormView Control Format
You'd do this in the FormView's DataBound event. You can do a findcontrol in there, get your control, set its properties.
Re: [2005] FormView Control Format
I tried using FindControl before in a hasty attempt and didn't have any luck. However, now that you suggested using it, I tried again and realized I forgot to put the Id of the control in quotes. Thanks mendhak!
Re: [2005] FormView Control Format
No prob, add resolved if that answered your question, ask again if it didn't. :D