问题
How do I store a variable or object application wide in ASP.net MVC?
In regular ASP, you had the Application object and in ASP.net too apparently.
I'm using ASP.net MVC 2.
回答1:
In a controller you should be able to do this:
this.HttpContext.Application["foo"] = "bar";
来源:https://stackoverflow.com/questions/3430839/access-application-object-in-asp-net-mvc-to-store-application-wide-variables