注册 登录
编程论坛 ASP.NET技术论坛

asp.net分页的问题

浩天 发布于 2008-12-14 12:53, 1718 次点击
从数据库中读取一篇文章有三千个汉字,这样全显示在一个页面上太长了,所以我想要页面只显示一千个汉字该怎么分页啊???
1 回复
#2
chenxiao20062009-11-03 23:30

create proc pro_note
@rowIndex int ,
@maxNumber int
 as
with page as
(select id,row_number() over(order by id) as rowindex from note)

  select note.* from note,page where note.id=page.id
 and page.rowindex between (@rowIndex+1) and (@rowIndex+@maxNumber)
1