ASP.NET Color Picker - AutoPostBack

Current color (click to the box):
Color Picker
Previous color:

This example demonstrates AutoPostBack and PickButton properties use with ColorPostBack event (MS ASP.NET AJAX).

Example code

<script runat="server" language="c#">
private void Color_CallBack(object sender, ColorPostBackEventArgs e){
  color.Style["background-color"] = e.Color;
  previous.Style["background-color"] = e.PreviousColor;
}
</script>
...
<obout:ColorPicker runat="server" ID="picker" TargetId="color" TargetProperty="style.backgroundColor"
                             OnColorPostBack="Color_CallBack" PickButton="false" AutoPostBack="true" >
      <asp:TextBox readOnly="true" id="color" style="cursor: pointer;" runat="server"/>
</obout:ColorPicker>
Previous color:
<asp:TextBox readOnly="true" id="previous" style="width: 40px;" runat="server"/>

Download working example Download.

"First of all... loved the controls... its wonderful features and ease of use. Most of all, I would like to commend your support group. Even if we're still in evaluation mode, the support team has been great and very response. Keep up the great work!"

James Gagni Jr.
Aon Singapore

Random testimonial   All testimonials