"Conflict" of ID within the Datalist

0

Good afternoon everyone. Well, I have a datalist. Then I put a repeater inside, so far so good. But then, at the time I execute, only the first repeater appears stylized the way I want it. The rest I think should change the id, and ends up appearing without formatting. Well for what it seems, it should be my JQuery and JCarousel links that are giving this problem. But I still do not know how to solve it. Would anyone have a hint, a light to show me? link link

//Eis o código do meu datalist

 <asp:DataList ID="dlCustomers" runat="server" DataSourceID="ObjectDataSource2" RepeatColumns="1" RepeatDirection="Horizontal" HorizontalAlign="Center" OnItemDataBound="dlCustomers_ItemDataBound" OnSelectedIndexChanged="dlCustomers_SelectedIndexChanged" Width="85%">
                <ItemStyle HorizontalAlign="Center" />
                <ItemTemplate>
                    <asp:Label ID="lblCat" runat="server" Text='<%# Eval("Tipo") %>' visible="false"/>
                    <asp:Label ID="lblImagem" runat="server" Text='<%# Eval("Imagem") %>' Visible="False" />
                    <img src="<%# Eval("Caminho") + "" +Eval("Imagem") %>" width="200px" height="130px" id="imgPro"/>
                    <br />
                    <asp:Label ID="CodigoLabel" runat="server" Text='<%# Eval("Codigo") %>' Visible="False" />
                    <br />
                    <asp:LinkButton ID="btnPro" runat="server" CssClass="but" Text='<%# Eval("Descriçao") %>' href='<%# "Categorias.aspx?Codigo=" + Eval("Codigo") + "&Tipo=" + Eval("Tipo") %>'></asp:LinkButton>
                    <br />
                    <asp:Button ID="btnAlterar" runat="server" Text="Alterar" Visible="False" />
                    <br />
                    <asp:Button ID="btnExcluir" runat="server" OnClientClick="javascript:return confirm('Tem certeza que deseja excluir um grupo?');"  Text="Excluir" Visible="False" />
                    <br />
                    <asp:Button ID="btnVisivel" runat="server" Height="21px"  Text="Visibilidade" Width="93px" Visible="False" />
                    <br />
                    <br />
                    <br />
                    <ul id="mycarousel" class="jcarousel-skin-tango">
                    <asp:Repeater ID="rptImages" runat="server">
                        <ItemTemplate>
                            <li>
                                <img alt="" style='height: 75px; width: 75px' src='<%# Eval("Caminho") + "" +Eval("Imagem") %>' />
                            </li>
                        </ItemTemplate>
                 </asp:Repeater>
                </ul>
                </ItemTemplate>
            </asp:DataList>
    
asked by anonymous 02.12.2016 / 20:16

1 answer

0

Well, after much searching in Facebook groups, forums, I got the answer. In the forum aspforums.net a guy helped me. Suggested me to change this line of code

$(function () {
     $ ( "# Mycarousel ') jcarousel (.);    
});

For this

$(function () {
     $('[id*=mycarousel]').jcarousel();
});

So the answer is there, in case anyone needs help. And thanks to those who took some time to try to help.

    
05.12.2016 / 12:10