Reputation: 2198
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.
Upvotes: 13
Views: 10397
Reputation: 2411
In a controller you should be able to do this:
this.HttpContext.Application["foo"] = "bar";
Upvotes: 23