GridView没有自动加行号的功能,记录需要行号的话,可以在模板列中使用

<%# Container.DataItemIndex +1%>




repeater

<%# Container.ItemIndex +1%>


数据库查询序号:
RowNumber:  select rownumber() over (order by bookid) as rownumber ,* from booksource这句话主要用到了rownumber!而rownumber的主要语法(即结构)是:rownumber() over(order by @) 以@排序为表添加一个自曾的列!
所以上面的spl语句的意思是:为表booksource创建一个名为rownumber的自曾列!

posted on 2011-02-18 15:59  高兴happy  阅读(187)  评论(0编辑  收藏  举报