string str = "select *,(select count(id) from [b_articles] where cid in (select id from [b_article_categories] where parent = c.id)) as count_1 from [b_article_categories] c where parent =" + id;
Data = Common.Fill(str, "category");
foreach (DataRow d in Data.Tables["category"].Rows)
{
name = d["id"].ToString();
Repeater repter = new Repeater();
repter.ID = "rpt_bingli" + i.ToString();
Bindli(name,repter);
i = i + 1;
}
} private void Bindli(string name, Repeater repter)
{
string str1 = "select * from b_articles where cid=" + name;
DataSet DataBingLi = Common.Fill(str1, "b_articles", repter); ((Repeater)repter.FindControl(repter.ID)).DataSource=DataBingLi.Tables["articles"]; //不是说用FindControl吗
((Repeater)repter.FindControl(repter.ID)).DataBind();
}怎么是未将对象引入实例
Data = Common.Fill(str, "category");
foreach (DataRow d in Data.Tables["category"].Rows)
{
name = d["id"].ToString();
Repeater repter = new Repeater();
repter.ID = "rpt_bingli" + i.ToString();
Bindli(name,repter);
i = i + 1;
}
} private void Bindli(string name, Repeater repter)
{
string str1 = "select * from b_articles where cid=" + name;
DataSet DataBingLi = Common.Fill(str1, "b_articles", repter); ((Repeater)repter.FindControl(repter.ID)).DataSource=DataBingLi.Tables["articles"]; //不是说用FindControl吗
((Repeater)repter.FindControl(repter.ID)).DataBind();
}怎么是未将对象引入实例
((Repeater)repter.FindControl(repter.ID)).DataBind();