手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >ASP.NET在底层类库中获取Session C#类中获取Session 原创
ASP.NET在底层类库中获取Session C#类中获取Session 原创
摘要:类库中获取Session首先要添加引用获取Session复制代码代码如下:stringuser=(string)HttpContext.Cu...

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

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

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

获取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;

【ASP.NET在底层类库中获取Session C#类中获取Session 原创】相关文章:

asp.net GridView和DataList实现鼠标移到行行变色

ASP.NET数据库编程之Access连接失败

asp.net 数据访问层基类

在Asp.net用C#建立动态Excel

ASP.NET编程中的十大技巧第1/2页

完美解决Could not load file or assembly AjaxPro.2 or one of its dependencies. 拒绝访问。 原创

ASP.NET 2.0下随机读取Access记录的实现方法

ASP.NET中Session和Cache的区别总结

asp用户登录模块实例代码

asp.net 多字段模糊查询代码

精品推荐
分类导航