html 中是什么意思?

simhare 2006-10-31 02:29:43
html 中<u>是什么意思?
<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>???
...全文
264 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
seemwind 2006-10-31
  • 打赏
  • 举报
回复
<asp:label id=lblCount runat=server/>
everyltt 2006-10-31
  • 打赏
  • 举报
回复
非要用Label么?
<HeaderTemplate>
<%# totalNumber%>
</HeaderTemplate>
simhare 2006-10-31
  • 打赏
  • 举报
回复
不行啊,这样一来,报:webForm1 中不包含对lblCount的定义,因为lblCount在dataList1 中,不在
webForm1 中定义是没办法访问的,如果在webform1中定义了这个lblCount,它又到页面顶部去了.
everyltt 2006-10-31
  • 打赏
  • 举报
回复
看这样行么
protected int totalNumber;
...
totalNumber=this.dataSet["company"].Rows.Count;
...
<HeaderTemplate>
<asp:label id=lblCount Text='<%# totalNumber%>'/>
</HeaderTemplate>
simhare 2006-10-31
  • 打赏
  • 举报
回复
感谢!
现在求第二个问题的解!
penglewen 2006-10-31
  • 打赏
  • 举报
回复
html 中<u>是加下划线.......

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧