| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 805 人关注过本帖
标题:[求助]ASP数据传递的问题
只看楼主 加入收藏
pingguo110
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-2-14
收藏
 问题点数:0 回复次数:5 
[求助]ASP数据传递的问题

下面的页面在浏览器中的JyDownID有数值,而我修改的却没有数值这个是为什么? 这是原板: <!--#include file="mdb_path_down.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>批量生成HTML</title> <style> body{font-size:12pt;line-height:140%} </style> </head> <body> <% Ds=timer() set rs=server.createobject("adodb.recordset") if request("type")="date" then if request("Dday")<>"" then Ddate=request("Dyear")&"-"&request("Dmonth")&"-"&request("Dday") sql="select id from down where date like '"&Ddate&"%'" else Ddate=""&request("Dyear")&"-"&request("Dmonth")&"-" sql="select id from down where date like '"&Ddate&"%'" end if elseif request("type")="new" then if request("newshu")>0 then sql="select top "&cint(request("newshu"))&" id from down order by date desc" end if elseif request("type")="list" then if request("ts")<>"" then rs.open ("select * from downtype where ts like '"&request("ts")&"%'"),conn,1,1 if not rs.eof then do while not rs.eof sqqq=sqqq& ""&rs("id")&", " rs.MoveNext loop end if rs.close sql="select id from down where tid in ("&sqqq&")" end if elseif request("type")="reg" then sql="select id from down where reg<>''" elseif request("type")="error" then sql="select id from down where error>0" elseif request("type")="JyDownID" then JyDownID=replace(request("JyDownID"),",",", ") sql="select id from down where id in("&JyDownID&")" elseif request("type")="all" then sql="select id from down order by date desc" end if

if sql<>"" then response.write"<b><font color=""#FF0000"">正在生成软件下载页的Html页,请等待......</font></b><span id=showImport></span><IE:Download ID=""oDownload"" STYLE=""behavior:url(#default#download)"" />" if request("p")<>"" then p=cint(request("p")) D=request("D") else p=1 D=Ds end if MaxPerPage=100 rs.open sql,conn,1,1 if not rs.eof then rs.pagesize=MaxPerPage '得到每页数 mpage=rs.pagecount '得到总页数 allshu=rs.recordcount '得到总数 rs.move (p-1)*MaxPerPage do while not rs.eof i=i+1 call MakeHtml() if i>=MaxPerPage then exit do rs.movenext loop end if rs.close Sshu=MaxPerPage*p-MaxPerPage+1 Tshu=Sshu+i-1

if allshu<Sshu then set rs=nothing conn.close set conn=nothing response.redirect "down_makesoftall.asp?type=ok&type2="&request("type")&"&shu="&request("shu")&"&D="&d&"&p="&p+1&"" response.end else response.write"<meta http-equiv=""refresh"" content=""0;url='down_makesoftall.asp?type="&request("type")&"&JyDownID="&request("JyDownID")&"&ts="&request("ts")&"&newshu="&request("newshu")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"&shu="&Tshu&"&D="&D&"&p="&p+1&"'"">" response.write"<br>正在生成:第("&Sshu&"-"&Tshu&")个 共"&allshu&"个" end if

Sub MakeHtml() response.write"<script>function onDownloadDone(downDate){showImport.innerHTML=downDate}oDownload.startDownload('down_makesoft.asp?id="&rs("id")&"',onDownloadDone)</script>" end Sub else sql="select count(*) from down" rs2=conn.execute(sql) shu=rs2(0) set rs=nothing conn.close set conn=nothing response.write"<b>批量生成HTML下载页" if request("type")="ok" then if request("type2")="JyDownID" then response.write("<script>alert('成功:共生成页面("&request("shu")&")个,总费时("&FormatNumber((timer()-request("D")),2)&")秒,完成时间("&Now()&")\n\n点击[确定]返回');history.go(-1)</script>") response.end else response.write"<br><br>操作成功:共生成页面<font color=""#FF0000"">"&request("shu")&"</font>个,总费时<font color=""#FF0000"">"&FormatNumber((timer()-request("D")),2)&"</font>秒,完成时间"&Now()&"" end if end if response.write"</b><ul><li><form name=""JyDown"" method=""post"" action=""down_makesoftall.asp?type=date"">按日期生成下载Html页:<select size=""1"" name=""Dyear"">" for i=2001 to year(date()) response.write"<option value="""&i&"""" if i=year(date()) then response.write" selected" end if response.write">"&i&"</option>" next response.write"</select>-<select size=""1"" name=""Dmonth"">" for i=1 to 12 response.write"<option value="""&i&"""" if i=month(date()) then response.write" selected" end if response.write">"&i&"</option>" next response.write"</select>-<select size=""1"" name=""Dday""><option value=""""> </option>" for i=1 to 31 response.write"<option value="""&i&"""" if i=day(date()) then response.write" selected" end if response.write">"&i&"</option>" next response.write"</select> <input name=""change"" class=""buttonface"" value=""确认"" type=""submit""></form></li><li><form name=pdd method=""post"" action=""down_makesoftall.asp?type=new"">" response.write"生成最新<input size=8 name=""newshu"" value=""0"">个软件下载Html页<input name=""change"" class=""buttonface"" value=""确认"" type=""submit""></form></li><li>" response.write"<form name=pid method=""post"" action=""down_makesoftall.asp?type=all"">生成所有软件下载Html页<input name=""change"" class=""buttonface"" value=""确认"" type=""submit""> (共<font color=""#FF0000"">"&shu&"</font>个)</form></li></ul>" end if%> </body></html> 经过修改的: <!--#include file="conn.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>批量生成HTML</title> <style> body{font-size:12pt;line-height:140%} </style> </head> <body> <% Ds=timer() set rs=server.createobject("adodb.recordset") if request("type")="date" then if request("Dday")<>"" then Ddate=request("Dyear")&"-"&request("Dmonth")&"-"&request("Dday") sql="select productid from productid where dateandtime like '"&Ddate&"%'" else Ddate=""&request("Dyear")&"-"&request("Dmonth")&"-" sql="select productid from product where dateandtime like '"&Ddate&"%'" end if elseif request("type")="new" then if request("newshu")>0 then sql="select top "&cint(request("newshu"))&" productid from product order by dateandtime desc" end if elseif request("type")="list" then if request("ts")<>"" then rs.open ("select * from listtype where ts like '"&request("ts")&"%'"),conn,1,1 if not rs.eof then do while not rs.eof sqqq=sqqq& ""&rs("id")&", " rs.MoveNext loop end if rs.close sql="select productid from product where tid in ("&sqqq&")" end if elseif request("type")="reg" then sql="select productid from product where reg<>''" elseif request("type")="error" then sql="select productid from product where error>0" elseif request("type")="JyDownID" then JyDownID=replace(request("JyDownID"),",",", ") sql="select productid from product where productid in("&JyDownID&")" elseif request("type")="all" then sql="select productid from product order by dateandtime desc" end if

if sql<>"" then response.write"<b><font color=""#FF0000"">正在生成软件下载页的Html页,请等待......</font></b><span id=showImport></span><IE:Download ID=""oDownload"" STYLE=""behavior:url(#default#download)"" />" if request("p")<>"" then p=cint(request("p")) D=request("D") else p=1 D=Ds end if MaxPerPage=100 rs.open sql,conn,1,1 if not rs.eof then rs.pagesize=MaxPerPage '得到每页数 mpage=rs.pagecount '得到总页数 allshu=rs.recordcount '得到总数 rs.move (p-1)*MaxPerPage do while not rs.eof i=i+1 call MakeHtml() if i>=MaxPerPage then exit do rs.movenext loop end if rs.close Sshu=MaxPerPage*p-MaxPerPage+1 Tshu=Sshu+i-1

if allshu<Sshu then set rs=nothing conn.close set conn=nothing response.redirect "makeproductall.asp?type=ok&type2="&request("type")&"&shu="&request("shu")&"&D="&d&"&p="&p+1&"" response.end else response.write"<meta http-equiv=""refresh"" content=""0;url='makeproductall.asp?type="&request("type")&"&JyDownID="&request("JyDownID")&"&ts="&request("ts")&"&newshu="&request("newshu")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"&shu="&Tshu&"&D="&D&"&p="&p+1&"'"">" response.write"<br>正在生成:第("&Sshu&"-"&Tshu&")个 共"&allshu&"个" end if

Sub MakeHtml() response.write"<script>function onDownloadDone(downDate){showImport.innerHTML=downDate}oDownload.startDownload('makeproduct.asp?id="&rs("productid")&"',onDownloadDone)</script>" end Sub else sql="select count(*) from product" rs2=conn.execute(sql) shu=rs2(0) set rs=nothing conn.close set conn=nothing response.write"<b>批量生成HTML下载页" if request("type")="ok" then if request("type2")="JyDownID" then response.write("<script>alert('成功:共生成页面("&request("shu")&")个,总费时("&FormatNumber((timer()-request("D")),2)&")秒,完成时间("&Now()&")\n\n点击[确定]返回');history.go(-1)</script>") response.end else response.write"<br><br>操作成功:共生成页面<font color=""#FF0000"">"&request("shu")&"</font>个,总费时<font color=""#FF0000"">"&FormatNumber((timer()-request("D")),2)&"</font>秒,完成时间"&Now()&"" end if end if response.write"</b><ul><li><form name=""JyDown"" method=""post"" action=""makeproductall.asp?type=date"">按日期生成下载Html页:<select size=""1"" name=""Dyear"">" for i=2001 to year(date()) response.write"<option value="""&i&"""" if i=year(date()) then response.write" selected" end if response.write">"&i&"</option>" next response.write"</select>-<select size=""1"" name=""Dmonth"">" for i=1 to 12 response.write"<option value="""&i&"""" if i=month(date()) then response.write" selected" end if response.write">"&i&"</option>" next response.write"</select>-<select size=""1"" name=""Dday""><option value=""""> </option>" for i=1 to 31 response.write"<option value="""&i&"""" if i=day(date()) then response.write" selected" end if response.write">"&i&"</option>" next response.write"</select> <input name=""change"" class=""buttonface"" value=""确认"" type=""submit""></form></li><li><form name=pdd method=""post"" action=""makeproductall.asp?type=new"">" response.write"生成最新<input size=8 name=""newshu"" value=""0"">个软件下载Html页<input name=""change"" class=""buttonface"" value=""确认"" type=""submit""></form></li><li>" response.write"<form name=pid method=""post"" action=""makeproductall.asp?type=all"">生成所有软件下载Html页<input name=""change"" class=""buttonface"" value=""确认"" type=""submit""> (共<font color=""#FF0000"">"&shu&"</font>个)</form></li></ul>" end if%> </body></html>

搜索更多相关主题的帖子: 浏览器 ASP 数据 request 
2005-02-14 11:16
zero_one
Rank: 1
等 级:新手上路
帖 子:72
专家分:0
注 册:2005-2-12
收藏
得分:0 
你应该还要把你自己修改的贴出来.不然谁知道你的目的是做什么./
问题都没有说清楚

---------------------------------------------- 我郁闷,因为学得差劲。
2005-02-15 11:58
mjwang
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2004-12-7
收藏
得分:0 
这么多代码,哪有时间慢慢看哟,你怎么不把重点给列出来呀?

2005-02-17 09:39
seraph126
Rank: 1
等 级:新手上路
帖 子:83
专家分:0
注 册:2005-2-22
收藏
得分:0 
就是呀,把重点搞出来就可以了嘛!

把握生命,挥洒自己! 我就是我!
2005-02-22 16:55
冰岩
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2005-3-3
收藏
得分:0 
对头!!!
2005-03-04 00:54
0oooo
Rank: 1
等 级:新手上路
帖 子:24
专家分:0
注 册:2005-1-26
收藏
得分:0 
同意,没人会那么有时间帮你看完这一个堆代码

的,
2005-03-18 17:38
快速回复:[求助]ASP数据传递的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.032670 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved