在aspx页面中使会话处于活动状态,并要求用户继续或不继续 [英] Make session alive in aspx page and ask user to continue or not

查看:83
本文介绍了在aspx页面中使会话处于活动状态,并要求用户继续或不继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我需要在一个aspx页面中维护会话。但是这个页面的母版页和整个网站的母版页是不同的。那么如何在这种情况下管理会话,如果用户在该页面中甚至在整个应用程序的任何页面中进行某些服务器端活动,则应重置会话警报超时。



在会话超时两分钟之前,会发出警报并询问用户是否继续。如果用户选择继续,那么会话时间应该重新启动。



谢谢。

Hello,

I need to maintain session in one aspx page. But the master page of this page and master page of entire site is different. So how manage session in this scenario, if user make some server side activity in that page or even in any page of entire application then session alert timeout should be reset.

And before two minutes of session timeout, alert occurs and ask to user for continue or not. If user choose continue then session time should be restart.

Thanks.

推荐答案

两者都有你的母版页继承相同的基页类,它处理会话(OOP)或复制会话处理代码(不好的做法)



页面有不同的事实master对会话没有任何影响。
Either have both of your master pages inherit the same base page class which handles the session (OOP) or copy session handling code in both (bad practice)

The fact that the page has different master makes no difference to the session.


这篇关于在aspx页面中使会话处于活动状态,并要求用户继续或不继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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