ToggleButton Extender
The ToggleButton Extender is an ASP.NET AJAX extender that can be attached to an ASP.NET CheckBox control. ToggleButton allows the use of custom images to show the state of the CheckBox. The behavior of the CheckBox is unaffected by this.
ToggleButton Properties
- TargetControlID: The ID of the CheckBox to modify.
- Image Height\Image Width: The height and width of the image.
- CheckedImageUrl: The URL of the image to show when the toggle button is in the checked state.
- UncheckedImageUrl: The URL of the image to show when the toggle button is in the unchecked state.
Let's understand it with an example.
Step 1: Open Visual Studio and create a ptoject named ToggleButtonExtender.
Step 2: Add one Webform named ToggleButton.
Step: Now in design view we will add a ToolkitScriptManager.
The source code looks like this:
Now we run this project and see that the output looks like this.
This is all about the AJAX ToggleButton Extender in ASP.Net.
Happy Coding.