protected void rptList_OnItemDataBound(object sender, RepeaterItemEventArgs e)
{
var ds = new DataSet();
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DataList rptProduct = (DataList)e.Item.FindControl("dtList");
//找到分类Repeater关联的数据项
DataRowView rowv = (DataRowView)e.Item.DataItem;
ds = Public.DisplayDataSet("", " and a.ComClass=‘"+ rowv["ClassNo"] + "‘ ", "zhCompanyGet");
//根据分类ID查询该分类下的产品,并绑定产品Repeater
rptProduct.DataSource = ds;
rptProduct.DataBind();
}
}