|
-
Mar 18th, 2008, 11:30 AM
#1
Thread Starter
Frenzied Member
[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!!
-
Mar 18th, 2008, 11:58 AM
#2
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.
-
Mar 18th, 2008, 01:53 PM
#3
Thread Starter
Frenzied Member
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!
-
Mar 18th, 2008, 02:02 PM
#4
Re: [2005] FormView Control Format
No prob, add resolved if that answered your question, ask again if it didn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|