[c#]代码库
<asp:Repeater ID="searchList" runat="server">
<ItemTemplate>
<div class="col-xs-12 pro_list_show">
<a class="fancybox1 fancybox.iframe" href="resultdetail2.aspx?ID=<%#((System.Data.DataRowView)Container.DataItem)["ID"].ToString().Trim()%>" target="_blank">
<%#((System.Data.DataRowView)Container.DataItem)["Cname"].ToString().Trim()%>
</a>
</div>
</ItemTemplate>
</asp:Repeater>
protected void GetData()
{
DataTable dt1 = Common.Pager("adm_Regulation", "ID,RegCName AS Cname", "ID", 10, 1, true, "IsPublic=1").Tables[0];
int i = dt1.Rows.Count;
if (i < 10)
{
for (int j = 0; j < (10 - i); j++)
{
dt1.Rows.Add();
}
}
this.searchList.DataSource = dt1;
this.searchList.DataBind();
}
by: 发表于:2018-01-03 10:45:02 顶(0) | 踩(0) 回复
??
回复评论