好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

asp.net HttpHandler操作Session的函数代码

代码如下:

using System;
using System.Web;
using System.Web.SessionState;

public class HandleDataRequst : IHttpHandler, IRequiresSessionState
{

public void ProcessRequest (HttpContext context) {
//context.Session["name"]
}

这里的重点是一定要实现IRequiresSessionState或者IReadOnlySessionState,否则Session总是为null

当然这两个接口中没有规定任何方法。

查看更多关于asp.net HttpHandler操作Session的函数代码的详细内容...

  阅读:48次