ASP.NET如何經過後臺數據庫提供的連接播放視頻(不使用外置插件)

1.後臺視頻數據庫:css

 

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樣式:ide

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

4.結果spa

相關文章
相關標籤/搜索