?
Solved

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

Posted on 2011-03-10
3
Medium Priority
?
672 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
gamarrojgq earned 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

765 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