2 zhiduowuming zhiduowuming 于 2016.02.28 10:43 提问

asp根据typeid直接输出对应内容,无需url get传值
 Set dsIDClist = Server.CreateObject("ADODB.Recordset") 
        Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=0 and canbyenduser='y'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=0 and  canbyagnenduser='y'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=0 and canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"')  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=0 and canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"')  order by orderbyid desc"

根据typeid=x直接输出内容,不需要url get传值,怎么改呢,现在是要?typeid=x 传值才显示对应的

3个回答

caozhy
caozhy   Ds   Rxr 2016.02.28 10:52
 查找替换
Request.QueryString("typeid")
->
"x"
zhiduowuming
zhiduowuming 朋友你好,替换成什么呢,谢谢,xxx.com/idc2.asp?typeid=1 才会显示分类1的 我想不加?typeid=1直接在代码定义tyidpe=1输出
接近 2 年之前 回复
zhiduowuming
zhiduowuming   2016.02.28 12:05

自己解决了,定义了下typeid,没想到这么简单,谢谢大家关注!

showbo
showbo   Ds   Rxr 2016.02.28 12:21

直接写死

sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=0 and canbyenduser='y' and typeid='1'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"')  order by orderbyid desc"
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!