Home » FAQ » ASP.NET » GDI+ » I get error ‘Value of String cannot be converted System.Drawing.Color’ when I use label1.BackColor= ‘Red’
Try VB.NET
Label1.BackColor = System.Drawing.Color.FromName('Green')
C#
Label1.BackColor = System.Drawing.Color.FromName('Green');
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with