views:

34

answers:

2

Hi All,
I am using ajax colorpickerextender control for color selection. For TargetControlID, I have used a textbox. It shows hexadecimal color code into that textbox. Using this post I have resolved this for colorselection change event.
I am saving selected color into an xml file and reassigning it to the color control when form loads.
My problem is at loading it shows hexadecimal code.
Does anyone know how to resolve this issue?
Thanks in advance.

A: 

Not a very elegant solution, but try to set backcolor and forecolor to Transparent: Not a very elegant solution, but try this. It's stteing backcolor and forecolor to Transparent:

' BackColor='<%# System.Drawing.Color.Transparent %>' width="0px" Enabled="false" ForeColor='<%# System.Drawing.Color.Transparent %>' BorderStyle="None" BorderColor='<%# System.Drawing.Color.Transparent %>'> Width="20px" BorderStyle="None" BackColor='<%# System.Drawing.ColorTranslator.FromHtml(IIF(IsDbNull(Eval("Color")),"#FFFFFF",Eval("color")))%>'>....

Darek
A: 

I tried setting the back color and fore color to transparent, but it didn't worked for all the browsers. Now, what I did is, I set these properties, the selected color. So unless and until user explicitly moves cursor inside the color text box and selects the text inside it, this is not catchable. So for the time being issue is resolved at first sight.

Vijay Balkawade