如何显示消息 - 会话? [英] How to display message - session out?

查看:80
本文介绍了如何显示消息 - 会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如果在登录页面中显示消息为会话输出,如果阻止看到之前的

页面后退出?





在此先感谢..

Hi,

how to show a messages as ''session out'' in login page if prevent seeing previous
page after logout?


Thanks in advance..

推荐答案

检查是否有会话是否存在于您的登录页面中。如果Session get expires打印在 Label MessageBox.Show(Session Expired);

谢谢
Check whethere session exists in your login page or not. If Session got expires print on Label or MessageBox.Show("Session Expired");
Thanks


hi,

请参考以下链接获取您的要求。



ASP.NET中的警报会话超时 [ ^ ]



希望这会对你有所帮助。如果这对你有帮助,请标记为答案。



谢谢,

kk

Please refer below link for your req.

Alert Session Time out in ASP.NET[^]

hope this will help you. please mark as answer if this helps you.

thanks,
kk


其中一个我的项目用户想要具有类似的功能(如果用户注销应用程序并单击后退按钮,则必须显示会话已过期的消息)。为此,我们将页面配置为不存储在缓存中。此外,在页面加载事件中,我们检查了如果会话为空,则使用Response.Redirect()方法将用户注销,该方法使用查询字符串变量表示尝试访问页面而不登录。因此,您可以使用查询字符串重定向到登录页面时变量。如果在没有查询字符串变量的情况下访问此页面,则表示用户第一次登录应用程序。如果存在查询字符串变量,则表示用户尝试访问该页面而不登录。如果用户单击注销按钮,则可以执行相同的操作。我希望这可以清除你的疑问。
In one of my project the user wanted to have the similar functionality(If a user logs out the application and clicks the back button a message had to be shown that the session is expired). for this we configured the pages not to be stored in cache. Also on page load event we checked that if the session is empty the user will be logged out by using Response.Redirect() method with a query string variable representing the attempt to access the page without logging in. So you may use a query string variable while redirecting to the login page. If this page is accessed without query string variable, it means the user is logging in the application first time. If query string variable exist, it means the user is trying to access the page without logging in. Same thing can be done if the user clicks on log out button. I hope this may clear your doubt.


这篇关于如何显示消息 - 会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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