Click here to Skip to main content
13,198,075 members (65,018 online)
Rate this:
Please Sign up or sign in to vote.
Dear members,

I am using modalpopup extender on one of my page.
i have mentioned modalpopup css and modalpopupbackground,behaviourid

The problem is modalpopup gets displayed properly for first 5 time, as soon as i click it for 6 or more, modalpopup gets displayed behind the main screen,or goes behind the page.
this problem occurs when i continuously open and close modal popup multiple times without performing some other action.

for opening modalpopup i have set linkbuttonname to targetcontrolid and for closing a popup i have
used a cancel button serverside event to close it . Modalpopup1.close()

After doing google, i did mentioned some z-index property to 1 and even tried with 10000+ values, but still the problem persist,

Below is the code

    background-color: White;
    border: 0;
    vertical-align: top;
    z-index:10001 !important;
  background-color: Gray;
    filter: alpha(opacity=70);
    opacity: 0.7px;


<asp:UpdatePanel ID="Upnl_SelLineItems" runat="server">
                                                                                                <asp:LinkButton ID="lnkSelLineItem" runat="server" Text="Basket"></asp:LinkButton>
                                                                                                <asp:Panel ID="pnl_SelLineItem" runat="server" CssClass="modalPopup">
                                                                                                    <table style="border: thin solid #006699;">
                                                                                                            <td style="text-align: center; background-color: #006699; color: #FFFFFF;">
                                                                                                                Selected Line Items
                                                                                                            <td align="center">
                                                                                                                <asp:Panel ID="pnl_grdSelLineItem" runat="server" ScrollBars="Auto">
                                                                                                                    <asp:GridView ID="grd_SelLineItem" runat="server" AutoGenerateColumns="false" CssClass="Grid"
                                                                                                                        EmptyDataText="No Line Items Selected">
                                                                                                                            <asp:BoundField DataField="JEDate" HeaderText="JE Date" ReadOnly="True" />
                                                                                                                            <asp:BoundField DataField="JENumber" HeaderText="JE No." ReadOnly="True" />
                                                                                                                            <asp:BoundField DataField="DocumentType" HeaderText="Document Type" ReadOnly="True" />
                                                                                                                            <asp:BoundField DataField="FunctionalCurrency" HeaderText="Currency" ReadOnly="True" />
                                                                                                                            <asp:BoundField DataField="FunctionalAmount" HeaderText="Amount" ReadOnly="True" />
                                                                                                                            <asp:BoundField DataField="Description" HeaderText="Description" ReadOnly="True" />
                                                                                                                            <asp:TemplateField Visible="false">
                                                                                                                                    <asp:Label ID="lblauto_id" runat="server" Text='<%#Bind("Auto_Id") %>' Visible="false"></asp:Label>
                                                                                                                            <asp:BoundField DataField="PeriodStatus" HeaderText="PeriodStatus" />
                                                                                                                            <asp:BoundField DataField="PeriodComment" HeaderText="PeriodComment" />
                                                                                                            <td valign="top" style="text-align: center">
                                                                                                                <asp:Button ID="btnClose" runat="server" Text="Close" />
                                                                                                <asp:ModalPopupExtender ID="mpex_SelLineItem" runat="server" TargetControlID="lnkSelLineItem"
                                                                                                    BackgroundCssClass="modalBackground" PopupControlID="pnl_SelLineItem" RepositionMode="RepositionOnWindowResizeAndScroll"
                                                                                                    BehaviorID="B3" DropShadow="true" PopupDragHandleControlID="pnl_SelLineItem">
                                                                                                <asp:HiddenField ID="HiddenField3" runat="server" />
                                                                                               <asp:AsyncPostBackTrigger ControlID="btnClose" EventName="Click" />

Any suggestions?
Posted 11-Feb-13 7:03am
Updated 11-Feb-13 20:31pm
richcb 11-Feb-13 13:36pm
Use the "Improve question" widget to add the code you have so far on that please.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100