---
title: "AJAX Control Toolkit: ModalPopupExtender"  
description: "ModalPopupExtender use with ConfirmWindowExtender to show the confimation. The main key properties are:  TargetControlIDCancelControlIDOkControlIDPopu"  
author: "Amit Singh"  
published: 2010-09-29  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/143/ajax-control-toolkit-modalpopupextender  
category: "ajax"  
tags: ["ajax"]  
reading_time: 1 minute  

---

# AJAX Control Toolkit: ModalPopupExtender

ModalPopupExtender use with ConfirmWindowExtender to show the confimation. The main key properties are:\

- TargetControlID
- CancelControlID
- OkControlID
- PopupControlID

How we implement the ModalPopupExtender

**Step1:** we use the following control on aspx page

Example

```
 <div> <%--Using ScriptManager or ToolkitScriptManager according toolkit version--%> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <%--Using ModalPopupExtender and set the properties--%> <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1" CancelControlID  ="btnCancel" OkControlID="btnOK" PopupControlID="Panel1"> </cc1:ModalPopupExtender> <%--adding on button--%> <asp:Button ID="Button1" runat="server" Text="Submit Page" /> <br /> <%--add the panel and two button--%> <asp:Panel ID="Panel1" runat="server" Style="display: none; background-color: White; width: 200; border-color: Black; border-style: solid; padding: 20px;"> are you sure submit the page?<br /> <asp:Button ID="btnOK" runat="server" Text="OK" /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> </asp:Panel></div>
```

**Step3:** Run the project

Click on submit button

![AJAX Control Toolkit: ModalPopupExtender](https://www.mindstick.com/mindstickarticle/ca913070-2af1-4a12-885f-5a31b1cefbc3/images/78bd300b-6f50-4315-9edc-f745cc1405bd.png)

\

---

Original Source: https://www.mindstick.com/articles/143/ajax-control-toolkit-modalpopupextender

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
