Modal Popup Extender
PopupcontroID : Used to specify the control to popup.
OkcontrolID : Used to specific ID of the control that represent ok in the confirmation
Cancel Control ID : Used to specify ID of the control that represent cancel in the confirmation.
Target Control ID : Used to specify the ID of the control for which the model popup has to be display. This must be same has that target control ID of the confirm Button Extender for which the model popupExtender is set.
The following example modifies the previous example to display the modelpopup extender for the confirmButton Extender
Take a panel on the page and within the panel take a label and two buttons and for the label set the cation “ Do you really want to copy ? ” and for the Buttons set the caption “yes” and “NO” and set the ID of the Buttons as btnyes & Btn
Within HTML source of the page drag & drop a Modelpopup Extender and set following properties for it.
<asp: ModelpopupExtender Id=ModelpopupExtender1 runat=”server” TargetControlID=”Btncopy” okcontrolID=”Btnyes” cancelcontrolID=”BtnNo” popup controlID=”panel1”> </asp:modelpopupExtender>
Modify the confirmButton Extender properties as follows
<asp: confirmButtonExtender ID=”ConfirmButtonExtender” runat=”server” TargetControlID=”BtnCopy” DisplaymodalpopupId=”modalpopupExtendar1”> </asp:ConfirmButtonExtender>