开发者

How to maintain user's session in ASP.NET MVC application?

I am working on migrating the existing ASP.NET application to MVC. Earlier we used to maintain the user sessions and can be accessed in whatever page we want.

Ex: Session["UserType"] = var_UserMastersBO.UserType.ToString();

We set this session Global.asax file.

In case if there are restricted pages based on the userType, we check this if condition in the page load.

Cal we implement the same in MVC?

Appreciate your responses. Thanks开发者_如何学运维


ASP.NET MVC is built on top of the ASP.NET so you can use every feature of ASP.NET like Session Membership Caching in MVC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜