我正在开发一个ASP.net项目,我正在使用Modal弹出窗口,我有一些问题,我的模态弹出取消按钮显示在页面加载中,我试图修复它,但我无法正确地做到这一点,请帮助我解决这个问题,我试图使用触发器和自动回发,但不能正常工作。
<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="White" />
<Columns>
<asp:CommandField ShowSelectButton="True"></asp:CommandField>
</Columns>
<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" runat="server" Text="Cancel" Font-Size="Smaller" ForeColor="Black" CssClass="btn btn-danger btn-xs" Height="25px" />
</div>
</div>
</div>
</div>
</div>
答案 0 :(得分:0)
<asp:ModalPopupExtender ID="mpConfirm" runat="server" 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="White" />
<Columns>
<asp:CommandField ShowSelectButton="True"></asp:CommandField>
</Columns>
<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>