Solved

ASP.NET - Like to assign a hex color to BackColor property

Posted on 2011-03-10
3
660 Views
Last Modified: 2013-12-17
Take a look at Image 1.  The BackColor property gives me a bunch of choices, but I'd prefer to simply assign a hexadecimal value to the property.  

Image 2 shows my attempts at assigning a hex value to BackColor.  Clearly I haven't determined the right syntax yet.
BackColorValues.png
Attempts-At-Hex-Values.png
0
Comment
Question by:jdana
3 Comments
 
LVL 13

Accepted Solution

by:
gamarrojgq earned 250 total points
ID: 35095194
Hi,

Try this

ddlLaborID.BackColor = System.Drawing.Color.FromName("#C7C1C2")
0
 

Author Closing Comment

by:jdana
ID: 35095283
gamarrojgq,

You are the man.  

Thanks.

J
0
 
LVL 23

Expert Comment

by:wdosanjos
ID: 35095289
Alternatively:

ddlLaborID.BackColor = System.Drawing.Color.FromArgb(&HFFC7C1C2)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now