What is the best approach to handle session timeouts in asp.net

后端 未结 3 1510
庸人自扰
庸人自扰 2020-11-30 13:11

There are various ways to handle session timeouts, like \"meta refreshes\" javascript on load functions etc.

I would like something neat like: 5 minutes before timeo

3条回答
  •  清歌不尽
    2020-11-30 13:52

    Use some jquery that keys off of your session timeout variable in the web.config. You can use this Jquery delay trick that when a specific time occurs (x number of minutes after load of the page), it pops up a div stating session timeout in x minutes. Nice, clean and pretty simple.

    Regarding session timeout, Codesleuth's ajax call would be perfect.

提交回复
热议问题