locked
BalloonPopupExtender in a ListView? can't find control RRS feed

  • Question

  • User-909867351 posted

    I

    I have one listBox and I need to show something like a panel. I choosed BalloonPopupExtender but I get the error. Can't find control...

    Please look at my code:

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <ajaxToolkit:BalloonPopupExtender ID="BalloonPopupExtender1" runat="server" TargetControlID="lblAviso1" BalloonPopupControlID="Panel1" DisplayOnClick="False" DisplayOnMouseOver="True" BalloonSize="Medium">           
            </ajaxToolkit:BalloonPopupExtender>
            <asp:Panel ID="Panel1" runat="server" style="display:none;">
                <asp:Label ID="lblAviso" runat="server" Text="O preço dos portes é calculado segundo a tabela dos CTT"></asp:Label>
                <span>Para mais informações consulte:</span><a href="http://ctt.pt">CTT</a>
                <br />
                <br />
                <asp:Button ID="Button1" runat="server" Text="Close" />
            </asp:Panel>        
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="Id" DataSourceID="SqlDataSource1" GroupItemCount="3">
                <AlternatingItemTemplate>
                    <td runat="server" style="">Id:
                        <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                        <br />modelo:
                        <asp:Label ID="modeloLabel" runat="server" Text='<%# Eval("modelo") %>' />
                        <br />ano:
                        <asp:Label ID="anoLabel" runat="server" Text='<%# Eval("ano") %>' />
                        <br />imagem:
                        <asp:Image ID="Image1" ImageUrl='<%# Eval("imagem") %>' runat="server" />
                        <br />descricao:
                        <asp:Label ID="descricaoLabel" runat="server" Text='<%# Eval("descricao") %>' />
                        <br />
                        <asp:Label ID="lblAviso1" runat="server" Text="Este é um Aviso"></asp:Label>
                    </td>
                </AlternatingItemTemplate>   

    I only show the alternatingItemTemplate because it's the same code to Itemtemplate

    Thank you

    Monday, November 7, 2016 10:44 AM

Answers

  • User-183374066 posted

    You to place it inside your ListView

          
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="Id" DataSourceID="SqlDataSource1" GroupItemCount="3">
                <AlternatingItemTemplate>
                    <td runat="server" style="">Id:
                        <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                        <br />modelo:
                        <asp:Label ID="modeloLabel" runat="server" Text='<%# Eval("modelo") %>' />
                        <br />ano:
                        <asp:Label ID="anoLabel" runat="server" Text='<%# Eval("ano") %>' />
                        <br />imagem:
                        <asp:Image ID="Image1" ImageUrl='<%# Eval("imagem") %>' runat="server" />
                        <br />descricao:
                        <asp:Label ID="descricaoLabel" runat="server" Text='<%# Eval("descricao") %>' />
                        <br />
                        <asp:Label ID="lblAviso1" runat="server" Text="Este é um Aviso"></asp:Label>
    <ajaxToolkit:BalloonPopupExtender ID="BalloonPopupExtender1" runat="server" TargetControlID="lblAviso1" BalloonPopupControlID="Panel1" DisplayOnClick="False" DisplayOnMouseOver="True" BalloonSize="Medium">           
            </ajaxToolkit:BalloonPopupExtender>
            <asp:Panel ID="Panel1" runat="server" style="display:none;">
                <asp:Label ID="lblAviso" runat="server" Text="O preço dos portes é calculado segundo a tabela dos CTT"></asp:Label>
                <span>Para mais informações consulte:</span><a href="http://ctt.pt">CTT</a>
                <br />
                <br />
                <asp:Button ID="Button1" runat="server" Text="Close" />
            </asp:Panel>  
    
                    </td>
                </AlternatingItemTemplate>  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 7, 2016 11:00 AM