This is a simple ASP page display code and in the form of ASP page display source code to provide to everyone,
The code is as follows |
Copy Code |
<% @LANGUAGE = "VBSCRIPT" codepage= "936"%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <title> Untitled Document </title>
<body> <% Dim conn,rs Set conn=server.createobject ("ADODB. Connection ") conn.connectionstring = "dbq=" &server.mappath ("Liouyan.mdb") & "; Driver={microsoft Access Driver (*.mdb)} " Conn.Open Set Rs=server.createobject ("ADODB. RecordSet ") Sql= "SELECT * from UserInfo" Rs.Open sql,conn,1,1 If not Rs. Bof and not Rs. Eof Then Dim page_no If request. QueryString ("page_no") = "" Then Page_no=1 Else Page_no=cint (Request.QueryString ("Page_no")) End If Rs.pagesize=5 Rs. Absolutepage=page_no Dim I I=rs.pagesize Do but not Rs. Eof and I>0 I=i-1 Response.Write RS ("username") & "Say to You:" &rs ("word") & "<br>" Rs. MoveNext Loop Response.Write "Please select a data page:" For I=1 to Rs.pagecount If I=page_no Then Response.Write I & "&NBSP" Else Response.Write "<a href= ' xianshi.asp?page_no=" &I& "' >" &i & "</a > " End If Next Else Response.Write "This Recordset is empty" End If Rs.close Set rs=nothing Conn.close Set conn=nothing %> </body> |