Adsence750x90

Thursday, March 12, 2009

How to Get Session In Handler (ashx) Files?

To Access session variable in Handler File

using System;
using System.Web;
using System.Web.SessionState;
public class Handler : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest (HttpContext context)
{
context.Session.Add("SessionName", "SessionValue");
}

public bool IsReusable {
get {
return false;
}
}

}