0
我在模態彈出窗口中放置了一個用戶控件。問題是,即使在彈出窗口被調用之前,它也會顯示出來。如果我用其他東西替換用戶控件,它將被正確隱藏。我放回用戶控制的那一刻,我遇到了同樣的問題。用戶控件在modalpopup擴展器中顯示不正確
這裏是我的代碼:
<asp:Panel ID="plSearch" runat="server" CssClass="modalPopup" Width="365">
<uc1:Search ID="searchSponsor" runat="server" Mode="ReturnID" />
<asp:Button ID="SearchCancel" runat="server" Text="Cancel" CausesValidation="False" />
<asp:UpdatePanel ID="upSearch" runat="server">
<ContentTemplate>
<asp:Label ID="lblSponsor" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<asp:ModalPopupExtender ID="mpeSearch" runat="server" TargetControlID="lbSearch"
PopupControlID="plSearch" BackgroundCssClass="modalBackground" DropShadow="False"
Enabled="True" CancelControlID="SearchCancel" />