Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET Javascript Ajax
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
 
.modalPopup
{
    background-color: White;
    border: 0;
    vertical-align: top;
    z-index:10001 !important;
}
.modalBackground
{
  background-color: Gray;
    filter: alpha(opacity=70);
    opacity: 0.7px;
 

}
 

 
<asp:UpdatePanel ID="Upnl_SelLineItems" runat="server">
                                                                                            <ContentTemplate>
                                                                                                <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;">
                                                                                                        <tr>
                                                                                                            <td style="text-align: center; background-color: #006699; color: #FFFFFF;">
                                                                                                                Selected Line Items
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <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">
                                                                                                                        <Columns>
                                                                                                                            <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">
                                                                                                                                <ItemTemplate>
                                                                                                                                    <asp:Label ID="lblauto_id" runat="server" Text='<%#Bind("Auto_Id") %>' Visible="false"></asp:Label>
                                                                                                                                </ItemTemplate>
                                                                                                                            </asp:TemplateField>
                                                                                                                            <asp:BoundField DataField="PeriodStatus" HeaderText="PeriodStatus" />
                                                                                                                            <asp:BoundField DataField="PeriodComment" HeaderText="PeriodComment" />
                                                                                                                        </Columns>
                                                                                                                    </asp:GridView>
                                                                                                                </asp:Panel>
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                        <tr>
                                                                                                            <td valign="top" style="text-align: center">
                                                                                                                <asp:Button ID="btnClose" runat="server" Text="Close" />
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </table>
                                                                                                </asp:Panel>
                                                                                                <asp:ModalPopupExtender ID="mpex_SelLineItem" runat="server" TargetControlID="lnkSelLineItem"
                                                                                                    BackgroundCssClass="modalBackground" PopupControlID="pnl_SelLineItem" RepositionMode="RepositionOnWindowResizeAndScroll"
                                                                                                    BehaviorID="B3" DropShadow="true" PopupDragHandleControlID="pnl_SelLineItem">
                                                                                                </asp:ModalPopupExtender>
                                                                                                <asp:HiddenField ID="HiddenField3" runat="server" />
                                                                                            </ContentTemplate>
                                                                                            <Triggers>
                                                                                               <asp:AsyncPostBackTrigger ControlID="btnClose" EventName="Click" />
                                                                                            </Triggers>
                                                                                        </asp:UpdatePanel>
 

Any suggestions?
Posted 11-Feb-13 7:03am
Edited 11-Feb-13 20:31pm
v2
Comments
richcb at 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
0 Sergey Alexandrovich Kryukov 385
1 George Jonsson 339
2 CPallini 335
3 BillWoodruff 314
4 OriginalGriff 227
0 OriginalGriff 5,030
1 CPallini 4,225
2 Sergey Alexandrovich Kryukov 3,604
3 George Jonsson 2,831
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2014
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