日期:2014-05-17  浏览次数:20848 次

如何在asp里实现分页中跳到[]页?
如何在asp里实现分页中跳到[]页?

------解决方案--------------------
向本页面传递当前页的参数即可,给你个参考:
1、表单“action”转向本页,并获取转向的页数
<form id= "form1 " name= "form1 " method= "post " action= "?id= <%= request( "id ") %> ">
2、建立文本框和按钮
<input name= "page " type= "text " id= "page " size= "5 " /> <input type= "submit " name= "Submit " value= "GO " />
3、然后就是分页的过程:
<%
exec= "select * From studentinfo where claid= "&id& " order by xh asc "
Set rs=Server.CreateObject( "ADODB.recordset ")
rs.Open exec,conn,1,3
totalstu=rs.recordcount
rs.PageSize=30
totalpage=rs.Pagecount
page=int(request( "page "))
if page= " " then
page=1
else if page <=1 then
page=1
end if
if page> totalpage then page=totalpage
rs.absolutepage = page
end if
end if
%>