手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络编程>Asp编程>列表

ASP FSO 框架实现ASP生成htm并分页的方法(批量)

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

else
if s=1 then
ts.write (" <a href="&HtmlStartName&replace(s,1,"")&".htm"&" class=blue>["& s &"]</a>")
else
ts.write (" <a href="&HtmlStartName&s&".htm"&" class=blue>["& s &"]</a>")
end if
end if
if s=ors.pagecount then
exit for
end if
end if
next
if cint(page)=ors.pagecount then
ts.write (" [后一页] [尾 页]")
else
ts.write (" <a href="&HtmlStartName&page 1&".htm"&" class=blue>[后一页]</a> <a href="&HtmlStartName&ors.pagecount&".htm"&" class=blue>[尾 页]</a>")
end if
ts.write("</TD></TR>")
'分页输出结束
do while not ors.eof and rowcount>0 '输出酒店名称
ts.write("<TR><TD width='100%'>"&oRs.Fields("Chinese_Name")&"</TD></TR>"&vbcrlf)
oRs.movenext
rowcount=rowcount-1'当页记录数-1 loop
ts.write("</Table></body></html>"&vbcrlf)
ts.close
set ts=nothing '释放对象
Dim EditFile'定义改写文件变量
Set EditFile = fs.GetFile(filez)'设置改写文件对象
EditFile.name= left(EditFile.name,len(EditFile.name)-4)&".htm" '改写文本文件成htm
next'循环生成结束(分页生成)
set EditFile=nothing '释放对象
set fs=nothing'释放对象
if err.number<>0 then '处理生成错误
Response.write(City&"更新时发生未知错误<A href=ToHtml.asp?City="&City&"&HtmlName="&HtmlStartName&">重新更新</A>")
else
Response.Write(City&"酒店更新已完成 "&Now())
end if
%>

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!