Asp.Net会话超时 [英] Asp.Net Session timeout

查看:95
本文介绍了Asp.Net会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

请给我您关于ASP.NET会话超时的建议.

我想在会话超时时将当前页面转移到Default.aspx页面.我正在使用当前页面的OnPreInit方法中的IsNewSeesion属性来检查会话是否超时并重定向到默认页面.

我试图从Global.asax的Session_End方法重定向Default.aspx页面,但是我收到了Object null异常,所以要解决这个问题,我正在尝试IsNewSession属性.

所以请告诉我IsNewSession属性是处理这种情况的好方法.

Robin

Hello All,

Please give me your suggestion about ASP.NET session timeout.

I would like to transfer current page to Default.aspx page when the session timeout. I am using IsNewSeesion property from the OnPreInit method of the current page to check whether the session timeout and redirect to the default page.

I have tried to redirect Default.aspx page from the Session_End method of the Global.asax but I have received Object null exception, so get around this I am trying IsNewSession property.

So please tell is the IsNewSession property is good way to handle this situation.

Robin

推荐答案

请参阅本文,这可能对您有用

如何在ASP中会话超时时重定向到另一个页面. NET(页面包含Ajax UpdatePanel时) [ ^ ]
Refer this article it may be useful to you

How to Redirect to Another Page when Session Timeout in ASP.NET (when pages contain Ajax UpdatePanel)[^]


这篇关于Asp.Net会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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