小弟初学asp,做了个网上考试系统,过程是这样的:首页接受用户名,判断合法后,用session传给exam页,进入试卷页考试,显示分数页面,可返回exam页想进行第二次考试时session丢失,请各位大哥帮忙谢谢。
另外经修改后,可在返回exam页进行第二次考试时显示session,但是考完后再回到exam页进行第三次考试时session又丢失了,请各位大哥帮忙。代码如下:
试卷页:
<% dim strusername
strusername=session("username")%>
<A HREF="http://127.0.0.1/mywork1/exam.asp?strusername=<%session("username")%>">参加其他科目考试</A>
exam页:
<% dim strusername
if session("username")<>"" then
strusername=session("username")
else strusername=request("username")
end if%>
请各位大哥帮忙谢谢
定义session失效时间
session.timeout=30 单位分钟
在网页中用自动刷新也可以的,<meta http="refresh" content="0 url=xxx.asp">