Getting Started with the ImageCheckBox Control

All you have to do to use our ImageCheckBox control is to register it on you page and save the received file as desired.

<%@ Register 
	Assembly="SharpPieces.Web.Controls" 
	Namespace="SharpPieces.Web.Controls" 
	TagPrefix="piece" %>

Declare the control in your ASPX/ASCX code like below:


<piece:ImageCheckBox 
	runat="server" 
	id="chkDemo" 
	Width="350px" 
	Text="Do you like sharppieces.com" 
 />

You can optionally specify the CheckedImageUrl and UncheckedImageUrl if you don't want to use the defaults.

If you need Autopostback feature enabled, you can set the Autpostback property to true, and handle the ImageCheckBox's CheckedChanged event, just like you would with a regular checkbox.

In addition to the regular ASP NET CheckBox control, you have two client side events, the OnClientBeforeChange and the OnClientAfterChange

The OnClientBeforeChange event occurs before the check occurs. You can use this function to cancel the check based on some interface logic, or you can cancel a postback by returning false.

The OnClientAfterChange event occurs after the check occurs, and you can update some interface logic depending on that.