Ajax Toggle Button Extender

Toggle Button Extender

This control is used with checkbox and it is used to provide different for checkboxes when it is checked and unchecked

 Properties 

TargetControlID:

CheckImageURL : Used to specify url of the image to display when the Targetcontrol is checked.

UncheckImageURl : Used to specify url of the image to display when the target control is unchecked.

Imagewidth & image height : Used to specify width & height of the image.

Example 

The following example demonstrates how  to use the ToggleButtonExtender

Add a page to the website & place a ToolkitScriptmanager & a check box on it & for the checkbox set the ID as C1.

With the HTML source of the page drag & drop a Toggle Button Extender and set following properties for it.

<asp:ToggleButtonExtender  Id=”ToggleButtonExtender1” runat=”server” TargetcontrolID=”c1” checkedImageurl=”~/Images/checked.ico” uncheckedimageurl=”~/images/unchecked.ico” imagewidth=”20” image height=”20”> </asp:ToggleButtonExtender>