<asp:DataList id=dataList1/>中我要在<HeaderTemplate>中加一个<asp:label id=lblCount />来显示我的数据库表中共有多少条记录,
在index.aspx.cs中this.不到我的这个lblCount
我在</asp:DataList>之后再写<asp:Label id = lblCount/>,然后在.cs文件中就能this.到lblCount
可是这样一来,这个label总是出现在页面的最左上角
.cs的有多少条记录的代码我是会写的:int totalNumber=this.dataSet["company"].Rows.Count;
this.lblCount.Text=Convert.ToSting["totalNumber"];
总之我的第二个问题就是:怎样把这个lblCount放在dataList1的头上,也要出现在<FooterTemplate>???