Convert last time I replied look at Coconut Grove dotnet Sky-----asp.net component Programming Step by Step-------------------
# reply: A little bug
The following converts a color value into a hexadecimal representation
String r,g,b;
R = (Convert.ToInt32 (THIS._BACKGROUNDCOLOR.R)). ToString ("X");
G = (Convert.ToInt32 (THIS._BACKGROUNDCOLOR.G)). ToString ("X");
B = (Convert.ToInt32 (this._backgroundcolor.b)). ToString ("X");
if (r.length==1) R = "0" + R;
if (g.length==1) g = "0" + G;
if (b.length==1) b = "0" + B;
-----------------------------------
In fact, the following code can be replaced by one line of code--------------------
The following converts a color value into a hexadecimal representation
String r,g,b;
R = (Convert.ToInt32 (THIS._BACKGROUNDCOLOR.R)). ToString ("X");
G = (Convert.ToInt32 (THIS._BACKGROUNDCOLOR.G)). ToString ("X");
B = (Convert.ToInt32 (this._backgroundcolor.b)). ToString ("X");
if (r.length==1)
r = "0" + R;
if (g.length==1)
g = "0" + G;
if (b.length==1)
b = "0" + B;
Table t= (table) controls[i];
T.attributes.add ("id", T.clientid);
this.textbox.attributes["onfocus" "]=" Ltmouseover ("+t.clientid+", "" + "#" + R + G + B + "')";
--------changed to-------------------------
THIS.TEXTBOX.ATTRIBUTES.ADD ("onmouseover", "Ltmouseover" (This, ' "+ colortranslator.tohtml (this._mouseovercolor) +" " )");
It's easy! I found it by accident! Because I think MS can not put a color conversion to write their own so trouble.