标签: asp.net
我有一个.net应用程序和一个类。在那个类中,我需要访问HttpApplicationState并在那里存储一些值。换句话说,这就是我需要做的事情:
Application["myKey"] = "value";
我该怎么做?我班上没有申请表。
答案 0 :(得分:2)
您正在寻找HttpContext.Current.Application["key"]。
HttpContext.Current.Application["key"]