Access "Application" object in ASP.Net MVC to store application wide variables
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.
In a controller you should be able to do this:
this.HttpContext.Application["foo"] = "bar";
精彩评论