ASP beginners must look at the paging program

Source: Internet
Author: User

<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<!--#include file= "conn/conn.asp"-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>---</title>
<style type= "Text/css" >
<!--

Body {
Background-color: #ECE9D8;
margin-left:10px;
margin-top:2px;
margin-right:10px;
margin-bottom:0px;
Background-image:url (need_images/bg.jpg);
}
input{
border-width:1px;
height:22;
Background-color: #ffffff;
Border-color: #000000;
}
html{
font-size:12px;
Scrollbar-face-color: #FFFFFF;
Scrollbar-arrow-color: #cccccc;
Scrollbar-track-color: #FFFFFF;
Scrollbar-3dlight-color: #FFFFFF;
Scrollbar-highlight-color: #fcfcfc;
scrollbar-shadow-color:# #FFFFFF;
Scrollbar-darkshadow-color: #FFFFFF
}
. title {
font-size:18px; COLOR: #010000; Font-family: "Bold"
}
a:hover {
COLOR: #f18b01; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
TD {
font-size:9pt; COLOR: #666666; Word-break:break-all; line-height:170%; Text-decoration:none
}
White
COLOR: #ffffff
}
. Company {
font-size:12px; COLOR: #2b2b2b; line-height:22px; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. dot {
font-size:12px; COLOR: #aeaeae; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. News {
font-size:12px; COLOR: #515151; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. Word {
font-size:12px; COLOR: #6f6f6f; line-height:18px; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. caption_dark {
Font-weight:bold; font-size:12px; COLOR: #000000; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. caption_simple {
Font-weight:bold; font-size:12px; COLOR: #ffffff; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. button {
font-size:12px; COLOR: #666666; Text-decoration:none
}
. Date {
font-size:10px; COLOR: #acacac; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. Doman {
Font-weight:normal; font-size:12px; COLOR: #0a52af; Font-family:arial, Helvetica, Sans-serif; Text-decoration:none
}
. form {
Border-right: #e0e0e0 1px solid; Border-top: #e0e0e0 1px solid; font-size:12px; Border-left: #e0e0e0 1px solid; COLOR: #333333; Border-bottom: #e0e0e0 1px solid; Font-family:verdana, Arial, Helvetica, Sans-serif; Background-color: #f7f7f7
}
. Web_button {
Font-weight:bold; font-size:12px; COLOR: #616e43; Text-decoration:none
}
. bbs_user {
Font-weight:bold; font-size:12px; COLOR: #ff6600; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. bbs_user_simple {
font-size:12px; COLOR: #575757; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. menu {
font-size:12px; COLOR: #e4e4e4; Text-decoration:none
}
. copright {
font-size:12px; COLOR: #333333; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. Bt_word {
font-size:12px; COLOR: #333333; line-height:18px; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. list {
font-size:12px; COLOR: #424242; Font-family: "??"; Text-decoration:none
}
. list_class {
font-size:12px; COLOR: #808080; Font-family: "???"; Text-decoration:none
}
. page {
font-size:12px; COLOR: #000000; Text-decoration:none
}
. bbs_bt {
Font-weight:bold; font-size:12px; COLOR: #000000; Text-decoration:none
}
. bbs_bt_simple {
Font-weight:normal; font-size:12px; COLOR: #545454; Text-decoration:none
}
. Bbs_list_word {
font-size:12px; COLOR: #171717; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. case {
font-size:12px; COLOR: #5a5e61; line-height:18px; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. date_simple {
font-size:10px; COLOR: #666666; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. product_bt {
Font-weight:bold; font-size:12px; COLOR: #333333; line-height:16px; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. prodcut {
font-size:12px; COLOR: #505050; line-height:16px; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. Form2 {
Border-right: #989898 1px solid; Border-top: #989898 1px solid; font-size:12px; Border-left: #989898 1px solid; COLOR: #333333; Border-bottom: #989898 1px solid; Font-family:verdana, Arial, Helvetica, Sans-serif; Background-color: #f6f6f6
}
. button3 {
font-size:12px; COLOR: #7b7b7b; Font-family:verdana, Arial, Helvetica, Sans-serif; Text-decoration:none
}
. bt1 {
Font-weight:bold; font-size:12px; COLOR: #717171
}
. bt_line {
font-size:14px; COLOR: #547db2; Font-family:verdana, Arial, Helvetica, Sans-serif
}
. bt2 {
Font-weight:bold; font-size:12px; COLOR: #ff9501; Font-family:verdana, Arial, Helvetica, Sans-serif
}
A.nav:link {
font-size:12px; COLOR: #ffffff; Text-decoration:none
}
a.nav:visited {
font-size:12px; COLOR: #ffffff; Text-decoration:none
}
A.nav:hover {
font-size:12px; COLOR: #ffff00; Text-decoration:none
}
<font face= "Verdana, Arial, Helvetica, Sans-serif" >
. Sb{color: #000000; Font-size:13px;text-decoration:none}
A.sb:visited{color: #6699FF; font-size:13}
A.sb:link{color: #3399CC; font-size:13px}
. tomg {color: #009966; font-size:12px; Text-decoration:none}
A.tomg:link {color: #006699; Text-decoration:none}
a.tomg:visited {color: #006699; Text-decoration:none}
a.tomg:hover {color: #FF3300; Font-size:12px;text-decoration:none}
font-size:12px {color: #333333; Text-decoration:none}
a.00:hover {color: #FF6666; Text-decoration:underline}
A.00:link {color: #666666; Text-decoration:none}
a.00:visited {color: #000000; Text-decoration:none}
A.bb:link {color: #666666; Text-decoration:none;cursor:hand;font-weight:bold}
a.bb:visited {color: #666666; Text-decoration:none;cursor:hand;font-weight:bold}
a.bb:hover {color: #CC0000; Text-decoration:underline;cursor:hand;font-weight:bold}
. Cc{color: #FFFFFF; Font-size:12px;text-decoration:none}
. tomg1 {color: #000000; Font-size:12px;text-decoration:none}
A.tomg1:link {color: #000000; Text-decoration:none}
a.tomg1:visited {color: #000000; Text-decoration:none}
a.tomg1:hover {color: #99CC33; Text-decoration:none}
. style1 {
Font-family:georgia, "Times New Roman", the Times, serif;
Font-weight:bold;
}
. style3 {Font-family:georgia, "times New Roman", times, serif; font-weight:bold; font-size:8pt;}
-->
</style>

<body>

<table width= "height=" 146 "border=" 0 "align=" center "cellpadding=" 0 "cellspacing=" 0 ">
<tr>
<td><iframe height= "146" width= "frameborder=" 0 "hspace=" 0 "align=" Middle "scrolling=" no "src=" need_ Top.asp "></iframe></td>
</tr>
</table>
<table width= "border=" 0 "align=" center "cellpadding=" 0 "cellspacing=" 0 "bgcolor=" #FFFFFF ">
<tr>
&LT;TD height= "Ten" colspan= "4" align= "center" valign= "Top" bgcolor= "#FFFFFF" ></td>
</tr>
<tr>
&LT;TD width= "190" height= "2" rowspan= "center" align= "Top" valign= "#FFFFFF" bgcolor= ><br
<iframe height= "width=" frameborder= "0" hspace= "0" align= "Middle" scrolling= "no" src= "need_left.asp" > </iframe>
</td>
&LT;TD width= "2" rowspan= "3" background= "Need_images/d_line_02.gif" bgcolor= "#FFFFFF" ></td>
&LT;TD colspan= "2" align= "center" valign= "Top" bgcolor= "#FFFFFF" ><table "width=" border= "0" cellspacing= "0" cellpadding= "0" >
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width= "border=" 0 "cellspacing=" 0 "cellpadding=" 0 ">
<tr>
&LT;TD width= "2%" align= "right" ></td>"
&LT;TD width= "27%" align= "left" background= "Images/ymcenter (1). jpg" ><span class= "Caption_dark" >&nbsp; &nbsp; site template |</span> <span class= "Bbs_user" >WEB</span></td>
&LT;TD width= "21%" align= "left" background= "images/tongyongwangzhi-back-5.jpg" ></td>"
&LT;TD width= "24%" background= "Images/tongyongwangzhi-back-5.jpg" >&nbsp;</td>
&LT;TD width= "26%" align= "right" background= "Images/tongyongwangzhi-back-5.jpg" >&nbsp;</td>
</tr>
</table>
<table width= "border=" 0 "align=" center "cellpadding=" 0 "cellspacing=" 0 ">
<tr>
&LT;TD height= "1" colspan= "3" background= "Need_images/d_line_01.gif" ></td>
</tr>
<%dim Sqlmb,page,i
I=0
sqlmb= "SELECT * from WEBMB ORDER BY id DESC"
Call Opendb
Rs.Open sqlmb,conn,1,1
If not rs.eof then
Page=cint (Request.QueryString ("page"))
If Page=0 Then
Page=1
End If
Rs.pagesize=15
If not isnumeric (page) or page<0 or Page>rs.pagecount or page= "" Then
Rs.absolutepage=1
Else
Rs.absolutepage=page
End If
End If%>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= "colspan=" 3 "></td>
</tr>
&LT;TR align= "center" valign= "Bottom" bgcolor= "#FFFFFF" >
<%
Do, not rs.eof and i<rs.pagesize
I=i+1
%>
&LT;TD width= height= "137" valign= "Top" bgcolor= "#FFFFFF" >&nbsp;<br>
&nbsp;&nbsp;
<%response.write ("<br><br>" &rs ("Mb_name"))%>
</td>
<% if I mod 3=0 then%>
&LT;TD width= "389" ></td>
</tr>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= "align=" center "class=" Web_button "></td>
&LT;TD height= "align=" center "class=" Web_button "></td>
</tr>
<tr >
&LT;TD height= "1" colspan= "2" align= "center" class= "Web_button" ></td>
</tr>
<% End If
Rs.movenext
Loop

%>
</table>
</td>
</tr>
<tr>
&LT;TD colspan= "2" align= "center" valign= "Bottom" bgcolor= "#FFFFFF" ><table width= "98%" border= "0" align= "center "cellpadding=" 0 "cellspacing=" 0 "bgcolor=" #FFFFFF ">
<tr>
&LT;TD height= "align=" "Center" bgcolor= "#F5F5F5" ><span class= "TOMG1" > Total <%=rs.recordcount%> strips Total <% =rs.pagecount%> page <%=page%> page current <%=i%> article
<% ' If rs.pagecount>1 then%>
<a href= "<%=request. ServerVariables ("Script_name")%>?page=1 "class=" TOMG1 "> Home </a> <a href=" <%=request. ServerVariables ("Script_name")%>?page=<%=rs.pagecount%> "class=" TOMG1 "> Last </a>
<% if Page>0 then%>
<a href= "<%=request. ServerVariables ("Script_name")%>?page=<%=page-1%> "class= tomg1" > Prev </a>
<%end if
If Page>0 then%>
<a href= "<%=request. ServerVariables ("Script_name")%>?page=<%=page+1%> "class=" TOMG1 "> next page </a></span>& nbsp </td>
<%end if
' End If
Call Closedb ()%>
</tr>
</table></td>
</tr>
&LT;TR align= "center" bgcolor= "#FFFFFF" >
&LT;TD height= "colspan=" 3 "></td>
</tr>
<tr bgcolor= "#FFFFFF" background= "Need_images/d_line_01.gif" >
&LT;TD bgcolor= "#FFFFFF" height= "2" colspan= "3" ></td>
</tr>
</table>
<table width= "height=" border= "0" align= "center" cellpadding= "0" cellspacing= "0" >
<tr>
&LT;TD height= "width=" ><iframe height= "" "Width=" "," frameborder= "0" hspace= "0" align= "Middle" Scrolling= "No" src= "bottom.htm" ></iframe>
</td>
</tr>
</table>
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.