每個(gè)人都曾試圖在平淡的學(xué)習(xí)、工作和生活中寫(xiě)一篇文章。寫(xiě)作是培養(yǎng)人的觀察、聯(lián)想、想象、思維和記憶的重要手段。那么我們?cè)撊绾螌?xiě)一篇較為完美的范文呢?接下來(lái)小編就給大家介紹一下優(yōu)秀的范文該怎么寫(xiě),我們一起來(lái)看一看吧。
aspx分頁(yè)篇一
asp即active server pages,是microsoft公司開(kāi)發(fā)的.服務(wù)器端腳本環(huán)境,可用來(lái)創(chuàng)建動(dòng)態(tài)交互式網(wǎng)頁(yè)并建立強(qiáng)大的web應(yīng)用程序。下面就由yjbys小編給大家介紹asp分頁(yè)代碼。
用這一句調(diào)用:
<%
call pagecontrol(icount,maxpage,page,"border=0 align=right","<p align=center>",per_page)
%>
<%
sub pagecontrol(icount,pagecount,page,table_style,font_style,per_page)
'生成上一頁(yè)下一頁(yè)鏈接
dim query, a, x, temp
action = "http://" & variables("http_host") & variables("script_name")
temp=""
("<table " & table_style & ">" & vbcrlf )
("<form method=get on = '" & action & "?zid="& zid & gro_page & "&" & temp & "page='+ ;return false;""><tr>" & vbcrlf )
("<td align=right>" & vbcrlf )
(font_style & vbcrlf )
if page<=1 then
("首頁(yè) " & vbcrlf)
("上頁(yè) " & vbcrlf)
else
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=1>首頁(yè)</a> " & vbcrlf)
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=" & (page-1) & ">上頁(yè)</a> " & vbcrlf)
end if
if page>=pagecount then
("下頁(yè) " & vbcrlf)
("尾頁(yè) " & vbcrlf)
else
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=" & (page+1) & ">下頁(yè)</a> " & vbcrlf)
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=" & pagecount & ">尾頁(yè)</a> " & vbcrlf)
end if
(" 頁(yè)次:" & page & "/" & pagecount & "頁(yè)" & ?vbcrlf)
(" 共有" & icount & "條/每頁(yè)"&per_page&"條" & ?vbcrlf)
(" 轉(zhuǎn)到" & "<input tyep=text size=4 maxlength=8 value=" & page & ">" & "頁(yè)" ?& vbcrlf & "<input type=submitfont-size: 9pt"" value=go )
("</td>" & vbcrlf )
("</tr></form>" & vbcrlf )
("</table>" & vbcrlf )
end sub
%>
讀取數(shù)據(jù)庫(kù)代碼:
<%
if tab_recall_tga="1" then
o_zid=zid
zid=tab_recall_cd(0)
subt_where=" where newtype='"&tab_recall_cd(1)&"'"
end if
i=0
exec="select newsname,adddate,newsid,imgurl,summary from mlist_"&zid&subt_where&" order by adddate desc"
set rs=object("set")
exec,conn,1,1
if and then
"目前還沒(méi)有任何數(shù)據(jù)"
else
ze =5 '每頁(yè)記錄條數(shù)
icount=count '記錄總數(shù)
ipagesize=ze
maxpage=unt
page=request("page")
per_page=ze
if not isnumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif ?page>maxpage then
page=maxpage
end if
tepage=page
if page=maxpage then
x=icount-(maxpage-1)*ipagesize
else
x=ipagesize
end if
for i=1 to x
if rs("newtype")=0 then
show_type=""
else
show_type=""
end if
uimg="0"
imgurl=trim(rs("imgurl"))
if len(imgurl)>0 then uimg="1"
if uimg<>"1" then ?imgurl="img/"
%>
<table width="98%" cellpadding="0" cellspacing="0">
<tr>
<td width="140" valign="top">
<table width="162" height="90" cellpadding="0" cellspacing="1" bgcolor="c5c5c5">
<tr>
<td width="169" bgcolor="#ffffff"><img src="<%=imgurl%>"newsname")%>" width="174" height="91"></td>
</tr>
</table></td>
<td height="70" valign="top">
<table width="97%" cellpadding="0" cellspacing="0">
<tr>
<td width="88%" height="25"><> 發(fā)布時(shí)間:<%=rs("adddate")%></td>
<td> </td>
</tr>
<tr>
<td height="65" valign="top"><%=rs("summary")%></td>
<td ?width="12%" valign="bottom"><a >
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" valign="top"><hr size="1" noshade></td>
</tr>
</table>
<% ? ?xt
next
end if
set rs=nothing
if tab_recall_tga="1" then zid=o_zid '重新恢復(fù)虛擬定向表
%>
插入代碼:
exec="insert into admin(user_id,user_pwd,lev)values('"&o_user_id&"','"&o_user_pwd&"','"&o_lev&"')"
' ?exec
e exec
set conn=nothing
更新代碼:
set rs=nothing
set conn=nothing
s("content_relate");
【asp分頁(yè)代碼是什么】相關(guān)文章:
1.
asp緩存類(lèi)代碼
2.
asp加法驗(yàn)證碼代碼
3.
asp購(gòu)物車(chē)代碼
4.
asp獲取當(dāng)前url代碼實(shí)例
5.
關(guān)于asp模板類(lèi)代碼參考
6.
組合模式的php代碼
7.
操作ini文件讀寫(xiě)類(lèi)實(shí)例代碼
8.
html代碼是什么
aspx分頁(yè)篇一
asp即active server pages,是microsoft公司開(kāi)發(fā)的.服務(wù)器端腳本環(huán)境,可用來(lái)創(chuàng)建動(dòng)態(tài)交互式網(wǎng)頁(yè)并建立強(qiáng)大的web應(yīng)用程序。下面就由yjbys小編給大家介紹asp分頁(yè)代碼。
用這一句調(diào)用:
<%
call pagecontrol(icount,maxpage,page,"border=0 align=right","<p align=center>",per_page)
%>
<%
sub pagecontrol(icount,pagecount,page,table_style,font_style,per_page)
'生成上一頁(yè)下一頁(yè)鏈接
dim query, a, x, temp
action = "http://" & variables("http_host") & variables("script_name")
temp=""
("<table " & table_style & ">" & vbcrlf )
("<form method=get on = '" & action & "?zid="& zid & gro_page & "&" & temp & "page='+ ;return false;""><tr>" & vbcrlf )
("<td align=right>" & vbcrlf )
(font_style & vbcrlf )
if page<=1 then
("首頁(yè) " & vbcrlf)
("上頁(yè) " & vbcrlf)
else
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=1>首頁(yè)</a> " & vbcrlf)
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=" & (page-1) & ">上頁(yè)</a> " & vbcrlf)
end if
if page>=pagecount then
("下頁(yè) " & vbcrlf)
("尾頁(yè) " & vbcrlf)
else
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=" & (page+1) & ">下頁(yè)</a> " & vbcrlf)
("<a href=" & action & "?zid="& zid & gro_page & "&" & temp & "page=" & pagecount & ">尾頁(yè)</a> " & vbcrlf)
end if
(" 頁(yè)次:" & page & "/" & pagecount & "頁(yè)" & ?vbcrlf)
(" 共有" & icount & "條/每頁(yè)"&per_page&"條" & ?vbcrlf)
(" 轉(zhuǎn)到" & "<input tyep=text size=4 maxlength=8 value=" & page & ">" & "頁(yè)" ?& vbcrlf & "<input type=submitfont-size: 9pt"" value=go )
("</td>" & vbcrlf )
("</tr></form>" & vbcrlf )
("</table>" & vbcrlf )
end sub
%>
讀取數(shù)據(jù)庫(kù)代碼:
<%
if tab_recall_tga="1" then
o_zid=zid
zid=tab_recall_cd(0)
subt_where=" where newtype='"&tab_recall_cd(1)&"'"
end if
i=0
exec="select newsname,adddate,newsid,imgurl,summary from mlist_"&zid&subt_where&" order by adddate desc"
set rs=object("set")
exec,conn,1,1
if and then
"目前還沒(méi)有任何數(shù)據(jù)"
else
ze =5 '每頁(yè)記錄條數(shù)
icount=count '記錄總數(shù)
ipagesize=ze
maxpage=unt
page=request("page")
per_page=ze
if not isnumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif ?page>maxpage then
page=maxpage
end if
tepage=page
if page=maxpage then
x=icount-(maxpage-1)*ipagesize
else
x=ipagesize
end if
for i=1 to x
if rs("newtype")=0 then
show_type=""
else
show_type=""
end if
uimg="0"
imgurl=trim(rs("imgurl"))
if len(imgurl)>0 then uimg="1"
if uimg<>"1" then ?imgurl="img/"
%>
<table width="98%" cellpadding="0" cellspacing="0">
<tr>
<td width="140" valign="top">
<table width="162" height="90" cellpadding="0" cellspacing="1" bgcolor="c5c5c5">
<tr>
<td width="169" bgcolor="#ffffff"><img src="<%=imgurl%>"newsname")%>" width="174" height="91"></td>
</tr>
</table></td>
<td height="70" valign="top">
<table width="97%" cellpadding="0" cellspacing="0">
<tr>
<td width="88%" height="25"><> 發(fā)布時(shí)間:<%=rs("adddate")%></td>
<td> </td>
</tr>
<tr>
<td height="65" valign="top"><%=rs("summary")%></td>
<td ?width="12%" valign="bottom"><a >
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" valign="top"><hr size="1" noshade></td>
</tr>
</table>
<% ? ?xt
next
end if
set rs=nothing
if tab_recall_tga="1" then zid=o_zid '重新恢復(fù)虛擬定向表
%>
插入代碼:
exec="insert into admin(user_id,user_pwd,lev)values('"&o_user_id&"','"&o_user_pwd&"','"&o_lev&"')"
' ?exec
e exec
set conn=nothing
更新代碼:
set rs=nothing
set conn=nothing
s("content_relate");
【asp分頁(yè)代碼是什么】相關(guān)文章:
1.
asp緩存類(lèi)代碼
2.
asp加法驗(yàn)證碼代碼
3.
asp購(gòu)物車(chē)代碼
4.
asp獲取當(dāng)前url代碼實(shí)例
5.
關(guān)于asp模板類(lèi)代碼參考
6.
組合模式的php代碼
7.
操作ini文件讀寫(xiě)類(lèi)實(shí)例代碼
8.
html代碼是什么

