这是我的代码
<asp:Repeater runat="server" ID="rptVideo"><ItemTemplate>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 nopadding">
<h3><b><%#Eval("Title")%></b></h3>
<iframe width="500" height="200" src='<%#Eval("Video")%>' frameborder="0" allowfullscreen></iframe></a>
</div>
</ItemTemplate>
这是我的c#代码
public void getGallery()
{
cmd.CommandText = "Getvideo_Home";
cmd.Parameters.Clear();
//cmd.Parameters.AddWithValue("@Id", Request.QueryString["id"]);
DataTable dtb = dboMrk.GetDataTableFrmDB(cmd);
if (dtb.Rows.Count > 0)
{
rptVideo.DataSource = dtb;
rptVideo.DataBind();
}
else
{
Response.Redirect("Default.aspx");
}
}
这是我的存储过程
create proc [dbo].[Getvideo_Home]
As
select * from Video where Status='A' and Video is not null
order by Id desc