问题描述
这是我的代码。我使用模态弹出扩展器在我的应用程序中完成搜索。所以我需要显示和隐藏我从子页面放置在母版页中的这个弹出窗口。 有人可以帮我吗?
<cc1:ModalPopupExtender runat="server" ID="mp1" PopupControlID="SearchPanel" TargetControlID="btnTarget"
CancelControlID="btnClose" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<div id="SearchPanel" runat="server" class="modalPopup">
<div class="row">
<div style="margin-left: auto; margin-right: auto; text-align: center;">
<asp:Label runat="server" Text="Key" ID="lblKey" Style="margin-left: 5px;"></asp:Label>
<asp:TextBox runat="server" ID="txtKey" Style="margin-left: 5px;"></asp:TextBox>
<asp:Button Text="Go" runat="server" CssClass="Btn-Go" ID="BtnGoSearch" OnClick="BtnGoSearch_Click" />
<br />
<div style="width: 800px; height: 190px; border: 2px solid grey; margin-top: 10px; text-align: center;">
<asp:GridView ID="GvSearchData" runat="server" ShowHeaderWhenEmpty="true" AllowSorting="true" AllowPaging="True" AutoGenerateColumns="False" Font-Size="11px" HeaderStyle-BackColor="lightGrey" FooterStyle-BackColor="#f0f1f3" BackColor="whitesmoke" DataKeyNames="PK" BorderColor="black"
EmptyDataText="No rows to display"
CellPadding="3" ShowFooter="True" PageSize="10" OnPageIndexChanging="GvSearchData_PageIndexChanging" OnRowDataBound="GvSearchData_RowDataBound" OnSelectedIndexChanged="GvSearchData_SelectedIndexChanged" Style="margin-bottom: 20px; margin-top: 10px; margin-left: 2px; margin-right: 2px;">
<Columns>
<asp:TemplateField HeaderText="SlNo" HeaderStyle-Width="40">
<ItemTemplate>
<asp:Label ID="lblRowNumber" Text='<%# Container.DataItemIndex + 1 %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Id" HeaderText="Id" HeaderStyle-Width="40" />
<asp:BoundField DataField="Code" HeaderText="Code" HeaderStyle-Width="120" />
<asp:BoundField DataField="Description" HeaderText="Description" HeaderStyle-Width="200" />
<asp:BoundField DataField="Category" HeaderText="Category" HeaderStyle-Width="200" />
<asp:BoundField DataField="SubCategory" HeaderText="SubCategory" HeaderStyle-Width="200" />
</Columns>
</asp:GridView>
</div>
<br />
<asp:Button ID="btnClose" runat="server" Text="Close" CssClass="Modal-Close" />
</div>
</div>
</div>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)