ASP分页
'显示"上一页 下一页":链接地址,总数,页数,是否显示总数,是否用下拉列表跳转,单位
Public Function PageControl(iCount,pagecount,page,table_style,font_style,colspan)
'生成上一页下一页链接
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
if colspan=0 then
Response.Write("<table " & Table_style & ">" & vbCrLf )
end if
Response.Write("<form name=formgo action="&action & "?" & temp &"><TR><TD align=right bgcolor=ffffff colspan="&colspan&" height=25>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
相关文档:
本文链接:http://www.oversteper.com/wprogram/asp/828.html
条件语句之 select case 语句
1、多条件分支的时候优先使用select case结构;
2、数字的大量列举时最好使用select case
3、必须使用 end select 来结束分支结构
示例:
以下为 ......
本文链接:http://www.oversteper.com/wprogram/asp/830.html
do ... loop 语句两种格式的示例
do whil ... loop :
以下为引用内容:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt ......
前段时间读了不少关于MVC的文章,试着在ASP中应用了一下,发现对于小程序,代码量会大幅度增加,但是逻辑清晰,数据封装很合理,以前需要仔细规划的代码复用竟然成了理所当然的事情。
所谓MVC,即Model(模型),View(视图),Control(控制)三层架构。各部分各司其职,Model即底层构架,包含与数据库连接的部分,View ......
ASP采集-ASP采集程序原理
采集程序的主要步骤如下:
一、获取被采集的页面的内容
二、从获取代码中提取所有用的数据
一、获取被采集的页面的内容
我目前所掌握的ASP常用获取被采集的页面的内容方法:
1、用serverXMLHTTP组件获取数据
以下内容为程序代码:
以下为引用的内容:
Function GetBody(weburl)
&n ......