---
title: "Ajax Toolkit ToggleButtonExtender Control in ASP.Net"  
description: "ToggleButton is an ASP.NET AJAX extender that can be attached to an ASP.NET CheckBox control. ToggleButton enables the use of custom images instead of"  
author: "Pushpendra Singh"  
published: 2010-12-05  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/285/ajax-toolkit-togglebuttonextender-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 1 minute  

---

# Ajax Toolkit ToggleButtonExtender Control in ASP.Net

**ToggleButton** is an ASP.NET AJAX extender that can be attached to an ASP.NET CheckBox control. ToggleButton enables the use of custom images instead of tick mark in the CheckBox. The behaviour of the CheckBox is unaffected.\

## 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.

## Code:

```
 <%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages.This enables partial-page rendering and Web-service calls.You have to used this if you want to use ajax control--%><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>   <%--Add the togglebuttonextender and one checkbox--%><cc1:ToggleButtonExtender ID="ToggleButtonExtender1" runat="server" TargetControlID="CheckBox1" UncheckedImageUrl="~/Unchecked.png"CheckedImageUrl="~/Checked.png" ImageHeight="60" ImageWidth="60"></cc1:ToggleButtonExtender>  <asp:CheckBox ID="CheckBox1" runat="server" Text="Do you want to select?" />
```

**Run the project**

Images hide the checkboxes to show the checked and unchecked state.

![AjaxControl Toolkit ToggleButtonExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/15df71b8-6430-42bb-a0e7-069813b66fe2/images/68fd9234-5a16-4d66-b7d8-8a70c7479f97.png)

![AjaxControl Toolkit ToggleButtonExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/15df71b8-6430-42bb-a0e7-069813b66fe2/images/bb989921-f2ff-4b69-a8a9-d6004303bad6.png)

---

Original Source: https://www.mindstick.com/articles/285/ajax-toolkit-togglebuttonextender-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
