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

二表跨ID分别连续提交出现问题

a190066 发布于 2010-12-12 20:31, 544 次点击
我原想在如下页,加入自动提交代码完成二个表连续提交二个不同的页面。
A.ASP 提交给 1-RSEVE.ASP  返回到 B.asp 提交又给 2-RSEVE.ASP

当 A.ASP 提交给 1-RSEVE.ASP 是向下一个ID提交:
http://localhost/A.ASP?id=1
<form method="POST" name="tt" action="1-RSEVE.ASP ?id=<%=request("id")+1%>">
设想1-RSEVE.ASP返回到http://localhost/B.ASP?id=1
在1-RSEVE.ASP加入以下代码,设想减一个ID回到http://localhost/B.ASP?id=1
代码:
Dim tID
tID=CInt(request("id"))
tID=tID-1
response.redirect"B.asp?id="&request("id")%>
但还是返回来到http://localhost/B.ASP?id=2
其实我想在A.ASP 跨一个ID提交后又返回到原来的ID,但tID=tID-1不起作用。
还是http://localhost/B.ASP?id=2。
请问如何返回到http://localhost/B.ASP?id=1

[ 本帖最后由 a190066 于 2010-12-12 20:47 编辑 ]
2 回复
#2
hams2010-12-13 08:28
response.redirect"B.asp?id="&tID

粗心呀
#3
a1900662010-12-13 13:24
回复 2楼 hams
谢谢。成功了。
1