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