注册 登录
编程论坛 ASP技术论坛

asp代码问题,用新的窗口查看对应ID的数据库详细内容,有图!

gege83 发布于 2012-07-14 20:30, 540 次点击
只有本站会员才能查看附件,请 登录
4 回复
#2
liying5682012-07-15 09:54
程序代码:
,连接数据库
'创建记录集 select xm form tabel1
if rs.eof next
暂无数据
end if
do while not rs.eof
’输出表格行

 <%=rs("id")%> <%=rs("xm")%> <a harf="xiangqing.asp?id=<%=rs("id")%>>查看详情</a>
rs.movenext
loop
rs close()
set rs=nothing

 详情网页(xiangqing.asp)
dim id
id=request.querystring("id")
,连接数据库
'创建记录集 select * form tabel1  id="'id'"  【查询数据库的sql语句不同!】
if rs.eof next
参数错误
end if
’输出表格
<%=rs("xm")%> <%=rs("nl")%> <%=rs("xb")%>
rs close()
set rs=nothing

纯手打,提供一个思路以及关键处代码,仅供参考
#3
netlin2012-07-15 23:06
楼主,你的问题在哪儿呢?
#4
ywyql_842012-07-16 21:06
你想问什么?
#5
aspic2012-07-16 22:23
一个链接传id过去 然后那边根据id来读取数据 显示之
1