Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

2 modal popup's not working on same page

$
0
0

If I have 1 modal popup, it works.  If I add the second modal popup, it doesn't work.  My modal popups both have a textbox and button that then check against a database and show data inside the modal as a gridview.  The modals come up, however, the gridviews don't populate if 2 modals are in the same page.  Code below:

<!--primary hr selector-->

       <asp:UpdatePanelID="UpdatePanelOutterHRPrimary"runat="server">

           <ContentTemplate>

 

 

               <cc1:ModalPopupExtender

                   ID="LinkButton1_ModalPopupExtender"

                   runat="server"

                   TargetControlID="lkbuttonPrimary"

                   BackgroundCssClass="modalBackground"

                   PopupControlID="PanelHRPrimary">

               </cc1:ModalPopupExtender>

               <br/>

 

               <fieldset>

                   <legend><h3>HR Assignment</h3></legend>

                   <asp:TableID="tblePrimary"runat="server"Width="900px">

                       <asp:TableRow>

                           <asp:TableCell>

                                Primary HR Partner:

                                <asp:TextBoxID="txtPrimaryHRAssignmentResults"runat="server"class="form-control"Width="290"Height="22"></asp:TextBox>

                               <asp:LinkButtonID="lkbuttonPrimary"runat="server">

                                   <asp:ImageID="imgSearchGlassPrimary"ImageUrl="~/images/searchglassYES.png"BorderWidth="0"Style="margin: auto; vertical-align: bottom;"Height="20"Width="20"runat="server"/>

                               </asp:LinkButton>

                           </asp:TableCell>

 

                       </asp:TableRow>

                   </asp:Table>

               </fieldset>

 

               

 

               <asp:PanelID="PanelHRPrimary"runat="server"CssClass="modalPopup"Style="display: block;">

                   <asp:UpdatePanelID="UpdatePanelInnerHRPrimary"runat="server">

                       <ContentTemplate>

                           <fieldset>

                               <br/>

                               <divstyle="width: 750px">

 

                                   <br/>

                                   <tablestyle="position: relative; left: 5%;right: 5%">

                                       <tr>

 

                                           <tdstyle="width: 100%;">

                                                Name Contains:&nbsp;<asp:TextBoxID="txtPrimarySearchFG"runat="server"MaxLength="50"class="form-control"Width="250px"></asp:TextBox>

                                               <asp:ButtonID="btnFindPrimary"runat="server"Text="Find HR Partner"class="btn btn-info btn-default"OnClick="btnEID_ClickP"/>

                                         <asp:RequiredFieldValidatorID="RequiredFieldValidatorPrimary"runat="server"ControlToValidate="txtPrimarySearchFG"ErrorMessage="Please enter Name"></asp:RequiredFieldValidator>

                                           </td>

                                       </tr>

                                       <tr>

                                           <tdstyle="width: auto">

 

                                                <asp:LabelID="lblGridMessage"runat="server"Text=""></asp:Label>

 

                                               <asp:GridView

                                                   ID="GridViewMP"

                                                   runat="server"

                                                   AllowSorting="True"

                                                   AutoGenerateColumns="False"

                                                    OnSelectedIndexChanged="GridViewMP_SelectedIndexChanged"

                                                   Width="641px"

                                                   class="table table-bordered">

 

                                                   <Columns>

                                                       <asp:CommandFieldShowSelectButton="True"/>

                                                       <asp:BoundFieldHeaderText="EID"DataField="EID"/>

                                                       <asp:BoundFieldHeaderText="HRName"DataField="HRName"/>

                                                       <asp:BoundFieldHeaderText="EmailAddress"DataField="EmailAddress"/>

                                                   </Columns>

 

 

                                               <FooterStyleBackColor="White"ForeColor="#000066"/>

                                                   <HeaderStyleBackColor="#006699"Font-Bold="True"ForeColor="White"/>

                                                   <PagerStyleBackColor="White"ForeColor="#000066"HorizontalAlign="Left"/>

                                                   <RowStyleForeColor="#000066"/>

                                                   <SelectedRowStyleBackColor="#669999"Font-Bold="True"ForeColor="White"/>

                                                   <SortedAscendingCellStyleBackColor="#F1F1F1"/>

                                                    <SortedAscendingHeaderStyleBackColor="#007DBB"/>

                                                   <SortedDescendingCellStyleBackColor="#CAC9C9"/>

                                                   <SortedDescendingHeaderStyleBackColor="#00547E"/>

                                               </asp:GridView>

 

                                           </td>

                                       </tr>

                                       <tr>

                                            <tdstyle="color: red"></td>

                                       </tr>

                                   </table>

                                       

                                </div>

                           </fieldset>

                           <br/>

                           <br/>

                       </ContentTemplate>

                   </asp:UpdatePanel>

               </asp:Panel>

 

 

           </ContentTemplate>

       </asp:UpdatePanel>

        <!--primary hr selector-->

 

 

 

 

 

       <!--SECONDARY hr selector-->

       <asp:UpdatePanelID="UpdatePanelSecondary"runat="server">

           <ContentTemplate>

 

 

               <cc1:ModalPopupExtender

                   ID="LinkButton_ModalPopupExtenderSecondary"

                   runat="server"

                   TargetControlID="LinkButtonSecondary"

                   BackgroundCssClass="modalBackground"

                   PopupControlID="PanelHRSecondary">

                </cc1:ModalPopupExtender>

               <br/>

 

               <fieldset>

                   <legend><h3>HR Assignment</h3></legend>

                   <asp:TableID="tbleSecondary"runat="server"Width="900px">

                       <asp:TableRow>

                           <asp:TableCell>

                                Primary HR Partner:

                                <asp:TextBoxID="txtHRSecondary"runat="server"class="form-control"Width="290"Height="22"></asp:TextBox>

                                <asp:LinkButtonID="LinkButtonSecondary"runat="server">

                                   <asp:ImageID="imgSearchGlassSecondary"ImageUrl="~/images/searchglassYES.png"BorderWidth="0"Style="margin: auto; vertical-align: bottom;"Height="20"Width="20"runat="server"/>

                               </asp:LinkButton>

                           </asp:TableCell>

 

                       </asp:TableRow>

                   </asp:Table>

               </fieldset>

 

               

 

               <asp:PanelID="PanelHRSecondary"runat="server"CssClass="modalPopup"Style="display: block;">

                   <asp:UpdatePanelID="UpdatePanel4"runat="server">

                       <ContentTemplate>

                           <fieldset>

                               <br/>

                               <divstyle="width: 750px">

 

                                   <br/>

                                   <tablestyle="position: relative; left: 5%;right: 5%">

                                        <tr>

 

                                           <tdstyle="width: 100%;">

                                                Name Contains:&nbsp;<asp:TextBoxID="txtSecondaryFind"runat="server"MaxLength="50"class="form-control"Width="250px"></asp:TextBox>

                                               <asp:ButtonID="btnFindSecondary"runat="server"Text="Find HR Partner"class="btn btn-info btn-default"OnClick="btnEIDSecondary_Click"/>

                                   <asp:RequiredFieldValidatorID="RequiredFieldValidatortxtSecondaryFind"runat="server"ControlToValidate="txtSecondaryFind"ErrorMessage="Please enter Name"></asp:RequiredFieldValidator>

                                           </td>

                                       </tr>

                                       <tr>

                                           <tdstyle="width: auto">

 

                                               <asp:LabelID="lblSecondaryMessage"runat="server"Text=""></asp:Label>

 

                                               <asp:GridView

                                                   ID="GridViewSecondary"

                                                   runat="server"

                                                    AllowSorting="True"

                                                   AutoGenerateColumns="False"

                                                   OnSelectedIndexChanged="GridViewSecondary_SelectedIndexChanged"

                                                    Width="641px"

                                                   class="table table-bordered">

 

                                                   <Columns>

                                                        <asp:CommandFieldShowSelectButton="True"/>

                                                       <asp:BoundFieldHeaderText="EID"DataField="EID"/>

                                                       <asp:BoundFieldHeaderText="HRName"DataField="HRName"/>

                                                       <asp:BoundFieldHeaderText="EmailAddress"DataField="EmailAddress"/>

                                                   </Columns>

 

 

                                               <FooterStyleBackColor="White"ForeColor="#000066"/>

                                                   <HeaderStyleBackColor="#006699"Font-Bold="True"ForeColor="White"/>

                                                    <PagerStyleBackColor="White"ForeColor="#000066"HorizontalAlign="Left"/>

                                                   <RowStyleForeColor="#000066"/>

                                                   <SelectedRowStyleBackColor="#669999"Font-Bold="True"ForeColor="White"/>

                                                   <SortedAscendingCellStyleBackColor="#F1F1F1"/>

                                                   <SortedAscendingHeaderStyleBackColor="#007DBB"/>

                                                   <SortedDescendingCellStyleBackColor="#CAC9C9"/>

                                                   <SortedDescendingHeaderStyleBackColor="#00547E"/>

                                               </asp:GridView>

 

                                           </td>

                                       </tr>

                                       <tr>

                                           <tdstyle="color: red"></td>

                                       </tr>

                                   </table>

                                       

                                </div>

                           </fieldset>

                            <br/>

                           <br/>

                       </ContentTemplate>

                   </asp:UpdatePanel>

               </asp:Panel>

 

 

           </ContentTemplate>

       </asp:UpdatePanel>

       <!--SECONDARY hr selector-->


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>