Accessing Value
You can get or set the value of the color picker through its
Value property.
For example, the following code changes Label1's background
color to the color selected by the user:
[C#]
Label1.BackColor = ColorPicker1.Value;
[Visual Basic.NET]
Label1.BackColor = ColorPicker1.Value
The following code clears the color picker's Value property:
[C#]
ColorPicker1.Value = Color.Empty;
[Visual Basic.NET]
ColorPicker1.Value = Color.Empty
The following code initializes the color picker to have an
initial "Blue" value:
[C#]
ColorPicker1.Value = Color.Blue;
[Visual Basic.NET]
ColorPicker1.Value = Color.Blue
Handling Events
Server side event Change
is fired when the color picker's value is changed between post backs.
By default, the color picker does not post back the page when user
selects a color unless AutoPostBack
is set to true.