14.3.12

string to color in c#

Here is the C# code for dynamically assigning the color value for the control

string colorval="Red";
Color color = Color.FromName(colorval);
button1.BackColor = color;
 
Cheers,
Venkatesan Prabu .J

No comments:

Post a Comment