Bootstrap模态弹出窗口不清除旧值ASP.NET

时间:2018-10-14 17:12:37

标签: asp.net angular twitter-bootstrap bootstrap-modal hidden-field

我有一个要求,我想使用模式弹出对话框作为确认删除来删除客户。如果我尝试删除客户5,则显示,在关闭模式后,如果我单击客户6,则仅在模式弹出窗口中显示客户5。当我关闭Modal时,如何清除以前的数据。

我无法将所需的ID放入模式弹出窗口中,我使用“隐藏”字段将值传递给Code Behind C#以使用SQL Server。

 <div class="modal  fade" id="myModal" role="dialog">
                    <div class="modal-dialog  modal-lg">
                        <!-- Modal content-->
                        <div class="modal-content">
                            <div class="modal-body">
                                <center>
                                <input type="text" runat="server"  name="hiddenFieldName" ng-value="{{x.Id}}" id="hiddenFieldName" hidden="hidden" />
                                    <h1>
                                        Are You Sure to Delete Customer  {{x.Id}}</h1>
                                    <p>
                                        Once Deleted ,Customer Information cannot be retreived back, Please Ensure before Deleting.<br />
                                        <b>Customer Name : {{x.VendorName}}</b>
                                    <div id="paymentDueCollapse" class="collapse" style="text-align: justify;">
                                        For your convenience, We have set a quick reminder that Your are currently using
                                        version<b>Purchase/v2.1.1123</b> Last updated on ( date: May 30<sup>th</sup> 2018).
                                        <br />
                                        Please <a href="http://demo.webdrop.in/Quotation Management/bill.htm" target="_blank"
                                            style="color: Orange;"><b>CLICK HERE</b></a> to view the Change Log.
                                        <br />
                                        I hope you have a wonderful rest of the week, and look forward to doing business
                                        with you again soon!
                                    </div>
                                    <hr />

                                    <asp:Button runat="server" ID="btnDelete" OnClick="btnDelete_Click" Text="Confirm Delete" CssClass="btn deleteBtnSmall" />
                                </center>
                            </div>
                            <div class="modal-footer">
                                <button type="button" onclick="javascript:window.location.reload()"    style="width: 200px;" class="Close Buttonquery pull-right" data-dismiss="modal">
                                    Cancel Delete</button>
                            </div>
                        </div>
                    </div>
                </div>

0 个答案:

没有答案