开发者

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";
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜