C# .NET - How to set Background color for string variable in asp.net c#?

Asked By Hari krishna s on 26-Sep-13 08:53 AM
How to set Background color for string variable in asp.net c#

I have take one class.in that class taken string variable .I need to give background color for that string .
Please tell me how to set color for string objs.
Thanks in advance
Robbe Morris replied to Hari krishna s on 26-Sep-13 09:34 AM
Do you mean convert a string like "#000000" to a background color for use in your .NET app?  If so,

System.Drawing.ColorTranslator.FromHtml("#000000")

Hari krishna s replied to Robbe Morris on 27-Sep-13 01:41 AM
Hi, Robbe  Morris.

 I don't want to convert string to color.i wanted to set fore color or background color for that string variable.
I applied your code but it did n't work.
 please tell me alternate solution.