六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個免費提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺!

ASP應(yīng)用范例-分頁_代碼局部

[摘要]<% dim Conn,RS,sqlStr,PageSize,RowCount,TotalPages,PageNo,Position,PageBegin,PageEnd set Conn= Server.CreateObject("ADODB.Connection") s...

<%

dim Conn,RS,sqlStr,PageSize,RowCount,TotalPages,PageNo,Position,PageBegin,PageEnd

set Conn= Server.CreateObject("ADODB.Connection")

set RS = Server.CreateObject("ADODB.RecordSet")

Conn.open "provider=sqloledb;data source=127.0.0.1;user id=sa;password=;initial catalog=zjydata"

sqlStr="select * from Items order by iID"

RS.open sqlStr,Conn,1,1

PageSize=10

If RS.RecordCount=0 then

%>

<TABLE WIDTH=100% BORDER=0 CELLPADDING=1 CELLSPACING=1 style='font-size:9pt'>

<TR bgcolor=#003366 height=20px>

<TD align=center><font color=#FFFFFF>商品代碼</font></TD>

<TD align=center><font color=#FFFFFF>商品名稱</font></TD>

<TD align=center><font color=#FFFFFF>型號規(guī)格</font></TD>

<TD align=center><font color=#FFFFFF>計量單位</font></TD>

<TD align=center><font color=#FFFFFF>參考進(jìn)價</font></TD>

<TD align=center><font color=#FFFFFF>參考售價</font></TD>

<TD align=center><font color=#FFFFFF>備注</font>

</TR>

<TR height=20px>

<TD align=center>沒有任何商品信息!</TD>

<TR>

</TABLE>

<%

else

RS.PageSize = Cint(PageSize)

TotalPages=RS.PageCount

PageNo=Request.QueryString("PageNo")

if PageNo="" or PageNo<1 Then

PageNo = 1

end if

RS.AbsolutePage = PageNo

Position=RS.PageSize*PageNo

PageBegin=Position-RS.PageSize+1

if Position <RS.RecordCount then

PageEnd=Position

else

PageEnd= RS.RecordCount

end if

%>

<TABLE WIDTH=100% BORDER=0 CELLPADDING=1 CELLSPACING=1 style='font-size:9pt'>

<TR>

<TD width=20%>

<%

Response.Write "頁:"& PageNo &" / "& TotalPages &" 記錄:"& PageBegin & " - " & PageEnd & " / " &RS.RecordCount

%>

</TD>

<TD align=right>

<%

if PageNo > 1 Then

response.write "<a href=list.asp?PageNo=1>首頁</a>&nbsp;<a href=list.asp?PageNo=" & (PageNo-1) & ">上頁</a>&nbsp;"

end if

if TotalPages > 1 and cint(PageNo) <> cint(TotalPages) then

response.write "<a href=list.asp?PageNo=" & (PageNo+1) & ">下頁</a>&nbsp;<a href=list.asp?PageNo=" & TotalPages & ">末頁</a>&nbsp;"

end if

%>

</TD>

</TR>

<TR bgcolor=#003366 height=20px>

<TD align=center width=20%><font color=#FFFFFF>商品代碼</font></TD>

<TD align=center width=30%><font color=#FFFFFF>商品名稱</font></TD>

<TD align=center width=8%><font color=#FFFFFF>型號規(guī)格</font></TD>

<TD align=center width=8%><font color=#FFFFFF>計量單位</font></TD>

<TD align=center width=8%><font color=#FFFFFF>參考進(jìn)價</font></TD>

<TD align=center width=8%><font color=#FFFFFF>參考售價</font></TD>

<TD align=center width=18%><font color=#FFFFFF>備注</font></TR>

<%

RowCount = RS.PageSize

dim color1,color2

color1="#dddddd"

color2="#eeeeee"

Do While Not RS.EOF and RowCount > 0

Response.Write "<TR height=20px bgcolor="

%>

<%

if RowCount mod 2=0 then:response.write color1 else:response.write color2

%>

<%

Response.Write ">"

%>

<TD><span><a href=manage.asp?id=<%=rs(0)%>><% =RS("vCode")%></a></span></td>

<TD><span><% =RS("vName")%></span></td>

<TD><span><% =RS("vSpec")%></span></TD>

<TD><span><% =RS("vUnit")%></span></td>

<TD><span><% =RS("fInPrice")%></span></td>

<TD><span><% =RS("fOutPrice")%></span></TD>

<TD><span><% =RS("vDescription")%></span></td>

</TR>

<%

RowCount = RowCount - 1

RS.MoveNext

Loop

Conn.Close

set RS = nothing

set Conn = nothing

%>

<TR bgcolor=#003366 height=20px>

<TD align=center width=20%><font color=#FFFFFF>商品代碼</font></TD>

<TD align=center width=30%><font color=#FFFFFF>商品名稱</font></TD>

<TD align=center width=8%><font color=#FFFFFF>型號規(guī)格</font></TD>

<TD align=center width=8%><font color=#FFFFFF>計量單位</font></TD>

<TD align=center width=8%><font color=#FFFFFF>參考進(jìn)價</font></TD>

<TD align=center width=8%><font color=#FFFFFF>參考售價</font></TD>

<TD align=center width=18%><font color=#FFFFFF>備注</font>

</TR>

<TR>

<TD>

<%

For i=1 to TotalPages

if CInt(PageNo) = CInt(i) then

response.write "["&i&"]"

else

response.write "&nbsp<a href=list.asp?PageNo="&i&">"&i&"</a>&nbsp"

end if

Next

%>

</TD>

</TR>

</TABLE>

<%

End if

%>



主站蜘蛛池模板: 日本成人在线免费 | 午夜在线免费观看视频 | 色一级 | 欧洲日韩视频二区在线 | 人人干在线 | 日本欧美国产精品第一页久久 | 特黄a大片免费视频 | 中文字幕第二一区 | 日本高清视频网站www | 欧美一级免费大片 | 色天天综合色天天碰 | 亚洲 丝袜 制服 欧美 另类 | 亚洲网站视频在线观看 | 日本在线观看视频网站 | 亚洲一区免费在线观看 | 特级淫片国产免费高清视频 | 欧美特黄a级高清免费大片 欧美桃色视频 | 日本二区在线观看 | 午夜男人的天堂 | 中文字幕乱偷乱码亚洲 | 亚洲精品中文字幕无乱码麻豆 | 日本又黄又硬又粗好爽视频免费 | 四虎永久在线精品国产免费 | 三级中文 | 日本理论在线 | 四虎影视在线影院www | 手机在线看片国产 | 欧美又大又粗又长又硬 | 色婷婷丁香 | 台湾佬成人中文网222vvv | 一二三四视频中文字幕在线看 | 日本美女高清在线观看免费 | 午夜影院美女 | 香蕉国产综合久久猫咪 | 四虎影视在永久在线观看 2019 | 日本成人一区二区三区 | 青青草原亚洲视频 | 色视频综合 | 青草下载 | 十八禁毛片 | 一区二区免费 |