【发布时间】:2017-03-10 10:02:28
【问题描述】:
我正在尝试将一些值存储在 Cache 中以供以后使用,我认为这是我需要的 https://msdn.microsoft.com/en-us/library/18c1wd61.aspx,但无法使其工作...
这就是我尝试使用它的方式(添加using System.Web):
Cache["name"] = "my name";
它说:
当前上下文中不存在名称“缓存”
我错过了什么?
【问题讨论】:
-
using System.Web.Caching -
返回:
The type or namespace name 'Caching' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)