I'm designing a web user control
it has a color property and I want to output in the HTML something like:
bgcolor=#FFDEAD
for this in the C# code I write(HtmlTextWriter output)
output.Write(" bgcolor={0}", BackColor);
but this doesn't work at all, my output is
bgcolor=Color [A=255, R=231, G=253, B=100]
how could I format the color value ?
I could build myself a number like that #123456 but the the default behavior
is nice, output a color name when it's a unique color, etc ....
how could I do that ?
please.... 3 1280
merveilleux dirais-je meme !
"Andrew de la Harpe" <an*********@hotmail.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP10.phx.gbl... checkout the WebColorConverter class.
"Lloyd Dupont" <ll***@RemoveIfNotSpamming.galador.net> wrote in message news:uN**************@tk2msftngp13.phx.gbl... I'm designing a web user control it has a color property and I want to output in the HTML something like:
bgcolor=#FFDEAD
for this in the C# code I write(HtmlTextWriter output)
output.Write(" bgcolor={0}", BackColor);
but this doesn't work at all, my output is bgcolor=Color [A=255, R=231, G=253, B=100]
how could I format the color value ? I could build myself a number like that #123456 but the the default behavior is nice, output a color name when it's a unique color, etc .... how could I do that ?
please....
checkout the WebColorConverter class.
"Lloyd Dupont" <ll***@RemoveIfNotSpamming.galador.net> wrote in message
news:uN**************@tk2msftngp13.phx.gbl... I'm designing a web user control it has a color property and I want to output in the HTML something like:
bgcolor=#FFDEAD
for this in the C# code I write(HtmlTextWriter output)
output.Write(" bgcolor={0}", BackColor);
but this doesn't work at all, my output is bgcolor=Color [A=255, R=231, G=253, B=100]
how could I format the color value ? I could build myself a number like that #123456 but the the default
behavior is nice, output a color name when it's a unique color, etc .... how could I do that ?
please....
merveilleux dirais-je meme !
"Andrew de la Harpe" <an*********@hotmail.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP10.phx.gbl... checkout the WebColorConverter class.
"Lloyd Dupont" <ll***@RemoveIfNotSpamming.galador.net> wrote in message news:uN**************@tk2msftngp13.phx.gbl... I'm designing a web user control it has a color property and I want to output in the HTML something like:
bgcolor=#FFDEAD
for this in the C# code I write(HtmlTextWriter output)
output.Write(" bgcolor={0}", BackColor);
but this doesn't work at all, my output is bgcolor=Color [A=255, R=231, G=253, B=100]
how could I format the color value ? I could build myself a number like that #123456 but the the default behavior is nice, output a color name when it's a unique color, etc .... how could I do that ?
please....
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Christian Schmidbauer |
last post by:
Hello!
I prepare my XML document like this way:
-------------------------------------------------------
PrintWriter writer;
Document domDocument;
Element domElement;
// Root tag
|
by: thomas |
last post by:
I must be doing something obvious wrong here, but:
I perform a query to retrieve a dataset - I want to archive this in a
SQL field for seperate retrieval later, while the original data may
have...
|
by: Winshent |
last post by:
I have a multi line text in an admin page on my cms.
I am trying to capture carriage returns as and replace them with
<p></p> bfore the string gets written to the database.
I have tried all...
|
by: David Bargna |
last post by:
Hi
I have a problem, I have a string which needs to be converted to a
byte array, then have the string representation of this array stored
in an AD attribute. This string attribute then has to...
|
by: Winshent |
last post by:
I have a multi line text in an admin page on my cms.
I am trying to capture carriage returns as and replace them with
<p></p> bfore the string gets written to the database.
I have tried all...
|
by: tjay |
last post by:
Hi. I wrote some code using sprintf and atof to store a double as a
string of fixed length and to convert it back to a double variable. The
string is stored in a char buffer global variable. I'm...
|
by: Nathan Sokalski |
last post by:
My Web.config file contains the following section to register some of my
UserControls:
<pages>
<controls>
<add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/>
<add tagPrefix="NATE"...
|
by: Christofer Dutz |
last post by:
Hi,
I am having a small problem, that is driving me nuts.
My application reads some Xml and runs 2 Xsl Transformations to generate
HTML. As soon as my second XSL introduces some <br/tags, the...
|
by: imonline |
last post by:
Hi,
I am generating XML and setting it into the string field. Which will be
again generated into xml. Now the last xml which has xml in string
field converts into ">" for the xml which is set...
|
by: alfarah |
last post by:
how to wirte C program to calculate and print the number of different symbols used in a given string. A blank space counts as one symbol.
Input: Any string. The length is limited to 60 characters....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |