开发者

popup is getting disaapeared after dropdown selection

开发者 https://www.devze.com 2023-03-16 22:42 出处:网络
<asp:Panel id=\"container\" CssClass=\"container\"runat=\"server\" style=\"width:850px\"> <asp:Panelrunat=\"server\" id=\"header\" cssClass=\"header\" >
<asp:Panel id="container" CssClass="container"  runat="server" style="width:850px">
            <asp:Panel  runat="server" id="header" cssClass="header" >
                <div class="msg">&nbsp;</div>
                <asp:LinkButton ID="LinkButton1" runat="server" CssClass="close" OnClientClick="clearDataKey()" />
            </asp:Panel>

            <div runat="server" id="whatup">
                <asp:Panel ID="Panel2" runat="server" >
                    <uc1:messageBox ID="InfoBox" runat="server" />
                </asp:Panel>
            </div>

            <asp:updatepanel ID="upcsconfirmation" runat="server">
                <ContentTemplate>
            <cc1:ModalPopupExtender ID="popupCS" runat="server"  BehaviorID="popupCS" TargetControlID="btnTargetCS" 
                        PopupControlID="pnlPopupCS" BackgroundCssClass="modalBackground"/>
                    <asp:Button ID="btnTargetCS" runat="server" Text="Button"  cssClass="hide" />
                    <cc1:DragPanelExtender ID="DragPanelExtenderCS" TargetControlID="pnlPopupCS"  runat="server"></cc1:DragPanelExtender>
                    <asp:Panel ID="pnlPopupCS" runat="server" SkinID="modal"></asp:Panel>
                    </ContentTemplate>
            </asp:updatepanel>



            <div class="body" >

                <div class="contentarea" style="height:200px;">

                    <asp:TextBox ID="datakeyholder" runat="server" style="display:none" Enabled="False" />
                    <asp:ObjectDataSource ID="odsCopyCustRequirements" runat="server" InsertMethod="InsertSearchRequirement" 
                        TypeName="SearchRequirementsDataObject" 
                        oninserting="Requirements_Inserting" >
                    </asp:ObjectDataSource>
                    <div style="height: 100%; width: 100%">

                        <div id="Div1" style="float: left; width: 45%; padding-left:10px">


                            <div class="column130">
                                <asp:Label ID="lblSearch1" runat="server" Text="FAST Region:"></asp:Label></div>
                            <asp:UpdatePanel ID="UpnlCust" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                                <ContentTemplate>
                                    <div class="column130">
                                        <asp:DropDownList ID="ddSearch1" AutoPostBack="true" DataTextField="Name"
                                            OnSelectedIndexChanged="ddSearch_SelectedIndexChanged" DataValueField="id"
                                            runat="server" Width="150px">
                                        </asp:DropDownList>
                                    </div>
                                    <div class="column130">
                                        <asp:Label ID="lblSearch2" runat="server" Text="Owning Office:"></asp:Label></div>
                                    <div class="column130">
                                        <asp:DropDownList ID="ddSearch2" DataTextField="Name" DataValueField="fastid"
                                            runat="server" Width="1开发者_运维百科50px">
                                        </asp:DropDownList>
                                    </div>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ddSearch1" />
                                </Triggers>
                            </asp:UpdatePanel>


 <div class="column">

                        </div> 
                    </div>
                </div>
               </div> 
               <p></p>


The upper update panel (upcsconfirmation) containing modal popup extender should have UpdateMode = "Conditional" - otherwise, asynchronous post-back from bottom update panel will also update its content restoring the modal popup to hidden state.

Yet another way to solve your issue is to use Show method of popup extender on server side when the bottom update panel posts back (for example, you can put the call popupCS.Show() in ddSearch_SelectedIndexChanged to keep the modal popup open).

0

精彩评论

暂无评论...
验证码 换一张
取 消