ASP.NET中使用FCKEditor.net,前台页面实现信息分页的问题

来源:百度知道 编辑:UC知道 时间:2024/09/28 11:48:57
我现在做的一个新闻发布系统,后台添加新闻信息的时候使用的是FCKEditor.net的在线编辑器,里面有个分页符按钮的。现在我想知道在前台如何实现分页,格式如 首页|上一页 1|2|3|4 下一页|尾页 的样式。由于时间紧迫,我也不想花时间去冥思苦想了,上来问问各位。回答符合,大大加分哦……

你可以用aspnetpage控件,veryeasy解决分页问题。
ALTER proc p_productsAspNetPage
(
@PageSize int,--每页显示几条
@curPage int , --当前页码
@cID int, --当前产品类别ID
@pcID int
)
as

declare @startID int --每页开始ID号
declare @endID int --每页结束ID号

set @endID=@curPage*@PageSize
set @startID=@endID-@PageSize+1

create table #t
(
tID int identity(1,1) primary key,
pID int --回贴ID

)
if(@cID>0)
begin
insert into #t
select pID from products
where cID = @cID and pcID=@pcID order by pID desc --某1个类别下的 所有产品ID 放进临时表
end
else
begin
insert into #t
select pID from products where pcID=@pcID order by pID desc
end

select #t.tID,p.pID,p.pName,p.cID,p.pPicture,p.fDate,p.pCount,p.price,p.pcID,p.pcID
from products as p --连接2张表
join #t on p.pID=#t.pID
where #t.tID between @startID and @endID order by fDate desc --分页查询