您如何在会话超时前2分钟发出警告 [英] how do you give a warning 2 minutes before the session timeout

查看:78
本文介绍了您如何在会话超时前2分钟发出警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示一个确认弹出窗口,如果他们想在超时值到期之前延长或重置超时值.

任何想法,代码片段?
感谢

I would like to display a confirmation popup if they want or not to extend/reset the timeout value before it expires.

any ideas, code snippets?
thanks

推荐答案

将StartTimeOutSet保留为变量,并假设超时设置为10分钟,则TimeOutWarningSet为StartTimeOutSet加8分钟. >
当前时间== TimeOutWarningSet时,然后执行某项操作


ASP.Net计时器 [ C#计时器 [
Hold the StartTimeOutSet as a variable, and assuming the time out is set at, say, 10 mins, then TimeOutWarningSet is StartTimeOutSet plus 8 minutes.

When current time == TimeOutWarningSet then Do Something


ASP.Net Timer[^]

C# timer[^]


这篇关于您如何在会话超时前2分钟发出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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