/ Published in: C#
                    
                                        
If you are working with an ashx handler and need to access your session, this is one way it can be done.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MyGenericHandler
{
/// <summary>
/// Summary description for $codebehindclassname$
/// </summary>
public class Handler : IHttpHandler,
System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
context.Session.Add("myVal",
context.Request["myVal"]);
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                