Home > DeveloperSection > Articles > AJAX Control Toolkit: ModalPopupExtender

AJAX Control Toolkit: ModalPopupExtender


AJAX AJAX 
Ratings:
0 Comment(s)
 5022  View(s)
Rate this:

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

 


Don't want to miss updates? Please click the below button!

Follow MindStick