经典的asp分页和会话状态
处理使用分页的经典 asp 页面。我遇到的错误是这样的:假设您的记录集中返回了 5 页,而您位于第 2 页。您离开并返回,然后按第 3 页的链接,问题在于您的会话已超时。我不知道为什么会发生这种情况,但页面已重新加载,但会话检查被绕过,当然,当页面尝试检索记录集时,会话变量现在为空,因此我收到一条消息,指出:“错误附近”, ' 第 1 行,因为现在查询已失效。我该如何解决这个问题?
谢谢,罗恩。
Working on a classic asp page that uses paging. The error I am having a problem with is this: Lets say that you have 5 pages returned in your record set and you are on page 2. You leave and come back, you then press the link for page 3, the trouble is your session has timed out. I don't know why this happens but the page is reloaded, but the session check is bypassed and of course when the page attempts to retrieve the record set the session variables are now empty so I am getting a message stating: error near ',' line 1, because now the query is defunct. How do I get around this?
Thanks, Ron.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以检查是否有任何会话变量为空并将用户重定向到首页或登录页面(如果有)。
You can just check if any session variable is empty and redirect user to the first page or login page (if you have it).