开发asp.net项目, 我添加AjaxControlToolkit,但总是得到错误。弹出窗口无效,
<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>
答案 0 :(得分:2)
最后我发现我现在使用16.1.1
的解决方案,在我更改了Ajax工具包virsion 15.1.4
后,现在正在使用
答案 1 :(得分:1)
按照设计,AjaxControl-ModalPopup必须针对旨在扩展的控件。隐藏字段无法扩展,因为模态控件是为了使用不同的控件列表而构建的;文本框,按钮等。
这是ajax控件工具包中源代码的链接, http://www.asp.net/web-forms/overview/ajax-control-toolkit/modalpopup/launching-a-modal-popup-window-from-server-code-cs