ASP.NET如何通过后台数据库提供的链接播放视频(不使用外置插件)

1.后台视频数据库:

2.aspx中的关键代码:

 1 <asp:DataList ID="DataList2" runat="server" DataKeyField="商品编号"  class="table_mingxing"
 2                             DataSourceID="SqlDataSource3" RepeatColumns="4" CellPadding="0" 
 3                             CellSpacing="2">
 4                             <ItemTemplate>
 5                                 <div  >
 6                                     <video  width="100%"  controls="controls" autostart='false'>
 7                                         <source src="<%# Eval("Src") %>"></source> type="video/mp4"/  >
 8                                     </video>
 9                                 </div>
10                                 <br />
11                                 <asp:Label ID="Label3" runat="server" Text='<%# Eval("备注") %>'></asp:Label>
12                             </ItemTemplate>
13 </asp:DataList><asp:SqlDataSource ID="SqlDataSource3" runat="server" 
14                             ConnectionString="<%$ ConnectionStrings:phone %>" 
15                             SelectCommand="SELECT * FROM [商品] where 商品类型编号='9'"></asp:SqlDataSource>

3.css样式:

.table_mingxing span{ color:#996633;}
.table_mingxing div{ 380px; height:200px}

4.结果

原文地址:https://www.cnblogs.com/feiquan/p/8128304.html