我们在哪里可以查看MVC3中的会话值? [英] Where can we check Session value in MVC3?

查看:96
本文介绍了我们在哪里可以查看MVC3中的会话值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是MVC的新手,谁能告诉我在哪里可以检查mvc3中的会话值.

我有5个控制器,每个控制器中有近50种actionresult方法.

我需要检查每种方法中的会话值吗?

-
谢谢,
Gopi.

Hi all,

I am new to MVC, can anyone tell me where can we check Session value in mvc3.

I have 5 controllers and in each controller there are nearly 50 actionresult methods.

Do I need to check the session value in each and every method?

--
Thanks,
Gopi.

推荐答案

您需要在要使用该会话值的页面的操作结果上检查会话值.

希望此链接可以帮助您理解概念:

http://www.tyronedavisjr.com /2008/11/23/detecting-session-timeouts-using-a-aspnet-mvc-action-filter/ [
You need to check Session value on Action Result of your Page in which you want to use that Session Value.

Hope this link might help you to understand the Concept:

http://www.tyronedavisjr.com/2008/11/23/detecting-session-timeouts-using-a-aspnet-mvc-action-filter/[^]


可以有人对我的问题有任何想法吗?

-
谢谢,
哥皮.
Can anyone please give any idea on my question?

--
Thanks,
Gopi.


这篇关于我们在哪里可以查看MVC3中的会话值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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