asp.net datalist image error

kadir koçaslan 65 Reputation points
2023-02-24T08:17:59.76+00:00

hello friends, I am taking data using datalist, there are pictures in each data, but not all of the pictures are in order, so the picture in the 1st data comes out, after saying next, the picture in the 2nd data comes and the picture in the 1st data disappears.

   <asp:DataList ID="DataList3" runat="server" DataSourceID="SqlDataSource1" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" RepeatColumns="1" RepeatDirection="Horizontal">
                <ItemTemplate>
                    <div class="container">
                        <div class="row row-30">
                            <div class="col-lg-6">
                                <div class="block-decorate-img wow fadeInLeft" data-wow-delay=".2s">
                                    <video class="controlvideo2" src="../video/<%# Eval("Video") %>" autoplay loop playsinline muted width="570" height="500"></video>
                                </div>
                            </div>
                            <div class="col-lg-1"></div>
                            <div class="col-lg-5 col-12">
                                <div class="block-sm offset-top-45">
                                    <h3 class="" data-wow-delay=".3s"><%# Eval("SirketAdi") %></h3>
                                    <span class="letter-spacing:0.05em;" style="display: inline-block;"><%# Eval("SirketAciklama") %></span>
                                    <a class="button-width-190 button-primary button-circle button-lg button offset-top-30" href="<%# Eval("link") %>" target="_blank"><%# Eval("SirketAdi") %></a>
                                    <br />
                                    <br />
                                </div>
                            </div>
                        </div>
                    </div>
                   <div class="container">
                            <div class="slideshow-container">
                                <div class="mySlides fade" style="opacity: inherit;">
                                    <div class="numbertext"><%# Eval("R1Ad") %></div>
                                    <img src="../images/<%# Eval("R1") %>" style="width: 100%; display: block;">
                                    <div class="text">
                                        <h4>İletişim  Bilgilerimiz</h4>
                                        <br>
                                        <i class="fa-solid fa-phone"></i><a href="tel:<%# Eval("R1Tel1") %>"><%# Eval("R1Tel1") %></a>
                                        <i class="fa-solid fa-phone"></i><a href="tel:<%# Eval("R1Tel2") %>"><%# Eval("R1Tel2") %></a><br />
                                        <i class="fa-solid fa-envelope"></i><a href="mailto:<%# Eval("R1Mail") %>"><%# Eval("R1Mail") %></a><br>
                                        <i class="fa-solid fa-map-location"></i><a href="<%# Eval("R1Location") %>" target="_blank"><%# Eval("R1Adres") %></a>
                                    </div>
                                </div>
                                    <a class="prev" onclick="plusSlides(-1)">❮</a>
                                    <a class="next" onclick="plusSlides(1)">❯</a>
                                </div>
                            <br>
                            <div style="text-align: center">
                                <span class="dot" onclick="currentSlide(1)"></span>
                            </div>
                    </div>
                </ItemTemplate>
            </asp:DataList>
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,255 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,250 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. QiYou-MSFT 4,306 Reputation points Microsoft Vendor
    2023-02-27T06:46:52.8633333+00:00

    Hi @kadir koçaslan

    In fact, I tested your code and didn't find the problem you gave .This issue may be related to the browser you are using. The browser I tested using was Edge.

    Or maybe your problem lies with video.

    I'll explain to you the properties in your code.

    autoplay Specifies that the video will start playing as soon as it is ready

    loop Specifies that the video will start over again, every time it is finished

    muted Specifies that the audio output of the video should be muted

    Here are my test results

    SQLTEST

    If you still have problems, please share more details so that I can help you solve the problem.

    Best regards,
    Qi You


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.