Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在我的 asp.net 应用程序中全局定义代码。但是我的代码包含会话变量..我将在哪里编写这些全局函数。请帮忙
您可以将代码放在任何引用System.Web.dll. 在您的代码中使用访问会话
System.Web.dll
System.Web.HttpContext.Current.Session["key"]