如何在我的网站上查找会话时间 [英] How to find session time in my website

查看:77
本文介绍了如何在我的网站上查找会话时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



我创建了网站。在这些我没有使用任何会话,但我得到了会话错误。如何在我的网站中查找会话时间以及如果会话超时消息如何设置警报消息。谢谢你提前。

Dear All,

I have created website. In these I didn't used any session but I got the session error. How can I find out session time in my website and how to set alert message if session time out message. Thanks in advanced.

推荐答案

为了实现它,你需要按照以下流程:



步骤1:声明一个javascript函数,它将检查会话是否为空。



步骤2:调用javascript函数,间隔1分钟来检查会话是否存在?您可以使用setTimeout()函数来调用该方法。



步骤3:如果session为null,则重定向到登录页面或显示警告消息。



请按照以下链接了解如何实施:

ASP.NET中的警报会话超时 [ ^ ]
In order to implement it you need follow below process:

Step1: Declare a javascript function which will check session is NULL.

Step2: Call that javascript function with 1 minute interval to to check session is exist? You can use setTimeout() function to call the method.

Step3: If session is null then redirect to login page or display an alert message.

Please follow below link how it can be implemented:
Alert Session Time out in ASP.NET[^]


这篇关于如何在我的网站上查找会话时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆