我需要使用bootstrap模式的按钮确认弹出对话框。我需要为我的团队做一些易于使用的事情,所以我使用了ajax ConfirmButtonExtender并做了类似的事情。但它不起作用。我收到此错误"值不能为null。参数名称:control"。这就是我所做的:
<button id="btnModal" type="button" class="btn btn-primary">Test Confirmation Dialog</button>
<ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server" DisplayModalPopupID="mpe" TargetControlID="btnModal">
</ajaxToolkit:ConfirmButtonExtender>
<ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" PopupControlID="pnlconfirm" TargetControlID="btnModal" OkControlID="btnSave"
CancelControlID="btnError">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel runat="server" ID="pnlconfirm">
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content form-horizontal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h2 class="modal-title">Confirmation Message</h2>
</div>
<div class="modal-body">
<p>You are about to delete one track url, this procedure is irreversible.</p>
<p>Do you want to proceed?</p>
</div>
<div class="modal-message">
<asp:Label ID="lblModalMessage" runat="server" Visible="false"></asp:Label>
</div>
<div class="modal-footer">
<asp:Button runat="server" ID="btnSave" Text="Cancel" CssClass="btn btn-default CausesValidation" />
<asp:Button runat="server" ID="btnError" Text="Delete" CssClass="btn btn-danger" />
<%--<button type="reset" class="btn btn-default" data-dismiss="modal">Cancel</button>--%>
</div>
</div>
</div>
</div>
我没有提到数据切换=&#34;模态&#34;数据目标=&#34;#myModal&#34;然而,要检查天气,这将工作与否。