空MVC应用中的会话概念 [英] Sessions Concept in Empty MVC App

查看:119
本文介绍了空MVC应用中的会话概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想在空的ASP.net MVC应用程序中使用会话验证的概念.

因此,任何人都可以为我提供有关在我的MVC应用程序中使用此会话概念的有用链接....

Hi all,

I would like use the concept of session validations in my empty ASP.net MVC app.

So, can any one provide me the usefull links regarding using this sessions concept in my MVC app....

推荐答案

您使用Session的方式与您使用在ASP.NET Webforms中执行.

只需使用Session对象:HttpContext.Current.Session["CurrentUser"]
You use Session the same way as you do in ASP.NET Webforms.

Simply use the Session object: HttpContext.Current.Session["CurrentUser"]


这篇关于空MVC应用中的会话概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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