扩展会话时间在按钮的Click事件服务器端 [英] Extend Session Time On Button Click Event Server Side

查看:95
本文介绍了扩展会话时间在按钮的Click事件服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来扩展用户的会话此刻他们点击一个按钮,触发了code背后的逻辑。例如,我需要100人到GridView,每次我加一个人的时间我希望会话被重置为30分钟。

Is there a way to extend the session of a user the moment they click a button that fires up code behind logic. Example I need to 100 people to a gridview and each time I add a person I want the session to be reset to 30 minutes.

我需要设置超时的某一页不是对整个网站。当用户点击一个按钮触发超时复位。所以,如果页面上的超时时间为30分钟,你就等着29分钟然后单击按钮超时又是30分钟。

I need to set the timeout on a certain page not the whole site. When a user makes a button click fire the timeout resets. So if the timeout on the page is 30 min, you wait 29 minutes then click the button the timeout is 30 min again.

推荐答案

这是自动发生。每次用户向服务器提交一个请求时,服务器延伸会话。这次会议是滑动。

It happens automatically. Every time the user submits a request to the server, the server extends the session. The session is "sliding".

在情况下,你问如何将它设置为30分钟,而不是默认的(20) - 有多个地方需要修改默认设置,例如web.config文件或IIS

In case you're asking how to set it to 30 minutes instead of the default (20) - there are various places to change the default, for example web.config or IIS.

这篇关于扩展会话时间在按钮的Click事件服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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