Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I'm using 4 ModalPopupExtenders on a single page. One works perfectly and the other does not. The others are called via codeBehind and every time one is triggered by a button all open at the same time.
I have tried putting BehaviorID, but to no avail.


How can I resolve this. Anyone have any ideas?
ASP
<!-- PopUp para exibir histórico de Versões-->

            <asp:UpdatePanel runat="server">
                <Triggers>
                    <asp:PostBackTrigger ControlID="btnVisualizar" />
                </Triggers>
                <ContentTemplate>

                    <asp:Panel runat="server" ID="pnlHistoricoVersoes" CssClass="divFundoModalAJAX">
                        <div class="divCaixaMensagemAJAXHistoricoVersoes">
                            <div class="divRibbonMensagemAJAX">
                            </div>
                            <div style="padding: 10px; margin-removed 37px;">
                                <asp:Label ID="Label15" CssClass="cabecalhoPopUp" runat="server">Versões Anteriores</asp:Label><br />
                                <div style="overflow: auto; overflow-x: hidden; max-height: 400px;">
                                    <asp:GridView ID="gvHistoricoPli" runat="server" AutoGenerateColumns="False" DataKeyNames="pli" AllowPaging="true"
                                        OnRowDataBound="gvHistoricoPli_RowDataBound" CssClass="gvHistorico mGrid" OnPageIndexChanging="gvHistoricoPli_PageIndexChanging" OnSelectedIndexChanged="gvHistoricoPli_SelectedIndexChanged">
                                        <Columns>
                                            <asp:TemplateField AccessibleHeaderText="pli" HeaderText="PLI">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="pli" runat="server" CausesValidation="False" CommandName="Select"
                                                        Text='<%# Eval("pli")%>'></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="versao" HeaderText="Versão" />
                                            <asp:BoundField DataField="totalAnoSafra" HeaderText="Total Ano Safra" />
                                            <asp:BoundField DataField="observacoes" HeaderText="Observações" />
                                            <asp:BoundField DataField="baseLine" HeaderText="BaseLine" SortExpression="baseLine" />
                                        </Columns>
                                        <SelectedRowStyle BackColor="#F6E6FF" ForeColor="#922980" Font-Bold="true" />
                                    </asp:GridView>
                                </div>
                                <div style="text-align: right; margin-removed 10px;">
                                    <asp:Button ID="btnVisualizar" runat="server" Text="Visualizar" CausesValidation="False"
                                        OnClick="btnVisualizar_Click" />
                                    <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" CausesValidation="False" />
                                </div>
                            </div>
                        </div>
                    </asp:Panel>

                    <asp:ModalPopupExtender runat="server" ID="mpeHistoricoVersoes" TargetControlID="Label15" CancelControlID="btnCancelar" BehaviorID="BehaviorMpeHistoricoVersoes" 
                        PopupControlID="pnlHistoricoVersoes">
                    </asp:ModalPopupExtender>
                </ContentTemplate>
            </asp:UpdatePanel>

And Behind code:
C#
protected void btnHistoricoVersoes_Click(object sender, EventArgs e)
{  
       mpeHistoricoVersoes.Show();
}
Posted
Updated 13-Mar-13 10:24am
v2
Comments
Richard C Bishop 13-Mar-13 16:25pm    
Well the code you posted only shows one ModalPopUpExtender and one line of code to open it. What is the name of your other modalpopups? If you named them all the same, they all will open on the same event when you call the .Show() method.
marcio_krul 13-Mar-13 16:32pm    
The names are different, and the methods are different too, but the struct is equal.
Each component has a unique ID and methods uniques .
marcio_krul 13-Mar-13 16:32pm    
The names are different, and the methods are different too, but the struct is equal.
Each component has a unique ID and methods uniques .

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900