Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am new to asp.please help to show youtube videos in my asp page.youtube id and description stored in database table.

What I have tried:

<pre><asp:DataList ID="DataList1" runat="server" BackColor="Gray" BorderColor="#666666"
            BorderStyle="None" BorderWidth="2px" CellPadding="3" CellSpacing="2"
            Font-Names="Verdana" Font-Size="Small" GridLines="Both" RepeatColumns="6" RepeatDirection="Horizontal"
            Width="665px">
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" Font-Size="Large" ForeColor="White"
                HorizontalAlign="Center" VerticalAlign="Middle" />
            <HeaderTemplate>
                video list</HeaderTemplate>
            <ItemStyle BackColor="White" ForeColor="Black" BorderWidth="2px" />
                <ItemTemplate>
                <a style="text-decoration: none;"
                      href='<%#Eval("videoid")%>'>
                <asp:Image ID="imgEmp" runat="server"  Width="100px" Height="120px" ImageUrl="http://img.youtube.com/vi/" +{'videoid'}+ "/mqdefault.jpg"; style="padding-left:40px"/><br /></a>
                </ItemTemplate>
        </asp:DataList>
Posted
Updated 28-Jul-17 1:43am

1 solution

See the below links for the help:


How to play YouTube video in ASP.Net Application[^]
 
Share this answer
 

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