ASP.NET在底层类库中获取Session C#类中获取Session 原创

(编辑:jimmy 日期: 2026/1/25 浏览:2)

类库中获取Session首先要添加引用

ASP.NET在底层类库中获取Session C#类中获取Session <font color=red>原创</font>

ASP.NET在底层类库中获取Session C#类中获取Session <font color=red>原创</font>

获取Session

复制代码 代码如下:
string user = (string)HttpContext.Current.Session["user"];

获取Page

复制代码 代码如下:
System.Web.UI.Page page = (System.Web.UI.Page)HttpContext.Current.Handler;

获取当前 Request Response 等对象都是在这里

复制代码 代码如下:
HttpResponse response = System.Web.HttpContext.Current.Response;
HttpRequest request = System.Web.HttpContext.Current.Request;

一句话新闻
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。