ASP.NET MVC - How to preserve some data between requests?
I am trying to solve a problem: when a user logs into the WebSite (via a .ascx custom control stored in the master page) that name is stored in the Page.User.Identity.Name property. Ok, but how do I get this username in the controller? Is this possible without registering the System.Security.Principal namespace in the controller? In other words, the controller needs to know whose user wants to take some action (for example, change account details). I could store its name in Html.Hidden control on every view, but I don't want to have a mess in my views
+2
source to share