手机
当前位置:查字典教程网 >编程开发 >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 重定向必须要知道的一些资料

asp.net 数据访问层基类

asp用户登录模块实例代码

asp.net Web Services上传和下载文件(完整代码)第1/2页

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

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

asp.net下获取Excel所有的工作表名称

asp.net为网页动态添加description描述信息的方法

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

asp.net连接数据库读取数据示例分享

精品推荐
分类导航