0

enter image description here

Im develop the asp.net project, Im add the AjaxControlToolkit, but always getting the error. popup is not working,

<asp:ModalPopupExtender ID="mpConfirm" runat="server" CancelControlID="btnDeleteCancel" DropShadow="true"
                    TargetControlID="HiddenField1" PopupControlID="DivConfirm">
                </asp:ModalPopupExtender>
                <asp:HiddenField ID="HiddenField1" runat="server" />
                <div class="panel" runat="server" id="DivConfirm">
                    <div class="panel-body" style="">
                        <asp:GridView ID="gvHelp" runat="server" AllowPaging="True" CssClass="table table-bordered table-condensed table-hover" PageSize="5" OnRowCommand="gvHelp_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None">
                            <%--<AlternatingRowStyle BackColor="Silver" />--%>
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:CommandField ShowSelectButton="True">
                                    <%--<ItemStyle ForeColor="#004080" />--%>
                                </asp:CommandField>
                            </Columns>

                            <%--<HeaderStyle BackColor="#004080" ForeColor="White" />
                                <RowStyle ForeColor="Black" />--%>
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                        <br />
                        <div>
                            <div>

                                <div>
                                    <asp:Button ID="btnDeleteCancel" Width="55px" Height="25px" runat="server" Text="Cancel" Font-Size="Smaller" CssClass="btn btn-danger btn-xs" />
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                </div>
Codeone
  • 1,173
  • 2
  • 15
  • 40

2 Answers2

2

Finally i found the solution im currently use 16.1.1, after i change the Ajax tool kit virsion 15.1.4,now its working

Codeone
  • 1,173
  • 2
  • 15
  • 40
1

By design an AjaxControl-ModalPopup must target a control that is designed to extend. A hidden field cannot be extended because the modal control is built to work with a different list of controls; textbox, button, etc.

Here is a link to the source from ajax control toolkit, http://www.asp.net/web-forms/overview/ajax-control-toolkit/modalpopup/launching-a-modal-popup-window-from-server-code-cs

  • Finally i found the solution im currently use 16.1.1, after i change the Ajax tool kit virsion 15.1.4,now its working – Codeone Sep 11 '16 at 12:58