Hi again,
I keep getting the following error:
Type 'AjaxControlToolkit.ConfirmButtonExtender' does not have a public property named 'DisplayModalPopupID'.
I have been trying to incorporate the Ajax Delete Confirm modal popup that I got from this superb forum:
ASP.Net AJAX ConfirmButtonExtender with ModalPopupExtender Example
I tried some changes by removing DisplayModalPopID and adding the following to that line:
OnOkScript="onOk()" DropShadow="true"
The error was gone but when I clicked Delete, nothing happened.
Can you please help?
//page directive
<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="Default.aspx.cs" Inherits="Home" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
...
...
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
...
...
<ItemTemplate>
<asp:ImageButton ID="imgbtnEdit" CommandName="Edit" runat="server" ImageUrl="~/Images/edit1.gif" ToolTip="Edit" Height="20px" Width="20px" />
<asp:ImageButton ID="slnkDelete" CommandArgument='<%# Eval("SpeakerID") %>' Text="Delete" runat="server" ImageUrl="~/Images/delete.gif" ToolTip="Click Click to delete" AlternateText="Delete" Height="20px" Width="20px" />
<cc1:ConfirmButtonExtender ID="cbe" runat="server" DisplayModalPopupID="mpe" TargetControlID="slnkDelete">
</cc1:ConfirmButtonExtender>
<cc1:ModalPopupExtender ID="mpe" runat="server" PopupControlID="pnlPopup" TargetControlID="slnkDelete"
OkControlID="btnYes" CancelControlID="btnNo" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: none">
<div class="header">
Confirmation
</div>
<div class="body">
Do you want to delete this record?
</div>
<div class="footer" align="right">
<asp:Button ID="btnYes" runat="server" Text="Yes" CssClass="yes" />
<asp:Button ID="btnNo" runat="server" Text="No" CssClass="no" />
</div>
</asp:Panel>
</ItemTemplate>
...
...
</div>
</form>
//web.config
<system.web>
...
...
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<controls>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
...
...
</system.web>
Once again, thank you very much for your assistance.