国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

asp生成HTM靜態列表分頁(含代碼,已測試成功)_ASP教程

2024-05-04 11:04:22
字體:
來源:轉載
供稿:網友

推薦:解讀ASP程序執行SQL語句時防止注入攻擊的問題
以下是一個簡單的用戶更改密碼的代碼 --------------------- username=request(user_name) pwd=request(pwd) username=replace(username,’,’’) pwd=replace(pwd,’,’’) sql=updatetbl_testsetpwd=’pwd’whereuid=’username’ setrs=

<!--#include file="conn.asp"-->
<html><head><TITLE>分頁測試</TITLE><LINK href="inc/style.css" type=text/css rel=stylesheet></head>
<%strHead=strHead&"<html>"
strHead=strHead&"<head>"
strHead=strHead&"<TITLE>分頁測試</TITLE>"
strHead=strHead&"<LINK href=""inc/style.css"" type=text/css rel=stylesheet>"
strHead=strHead&"</head>"
%>
<%
sql="select * from news"
set rs=server.createObject("ADODB.Recordset")
rs.open sql,conn,1,1
%><%
rs.pagesize=2
totalpage=rs.pagecount
rs.close
set rs=nothing

for j=1 to totalpage
sql="select * from news"
set rs=server.createObject("ADODB.Recordset")
rs.open sql,conn,1,1

whichpage=j
rs.pagesize=2
totalpage=rs.pagecount
rs.absolutepage=whichpage
howmanyrecs=0
%><%
str0=""
str0=str0&"</p>"
str0=str0&"<table bgcolor=#cecfce align=center border=0 width=800 cellpadding=2 cellspacing=1>"
%><%
do while not rs.eof and howmanyrecs<rs.pagesize
%><%
str0=str0&"<tr bgcolor=#f7f7f7>"
str0=str0&"<td bgcolor=#f7f7f7 align=""center"">"&rs(0)&"</td>"
str0=str0&"<td bgcolor=#f7f7f7 align=""center"">"&rs(1)&"</td>"
str0=str0&"<td bgcolor=#f7f7f7 align=""center"">"&rs(2)&"</td>"
str0=str0&"<td bgcolor=#f7f7f7 align=""center"">"&rs(3)&"</td>"
str0=str0&"</tr>"
%><%
rs.movenext
howmanyrecs=howmanyrecs+1
loop
rs.close
set rs=nothing
%><%str0=str0&"</table>"
%>

分享:揭秘asp常用函數庫大全
’-----------------FLYSOBlogASP站點開發常用函數庫------------------ ’OpenDB(vdata_url)--------------------打開數據庫 ’getIp()-------------------------------得到真實IP ’getIPAdress(sip)------------------------查找ip對應的真實地址 ’IP2Num

共2頁上一頁12下一頁
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 察雅县| 九江县| 峨眉山市| 长宁区| 海口市| 泰安市| 墨脱县| 唐山市| 舞阳县| 保山市| 肃南| 板桥市| 南宫市| 伊通| 潼关县| 绿春县| 西充县| 奉节县| 兴安盟| 昌江| 达州市| 临猗县| 临桂县| 大丰市| 古浪县| 化德县| 太湖县| 措勤县| 茶陵县| 凉城县| 莆田市| 蒙城县| 灵丘县| 长兴县| 吴忠市| 湘阴县| 丹巴县| 常宁市| 图们市| 汕头市| 集安市|