Created
September 26, 2011 11:23
-
-
Save fengelz/1242048 to your computer and use it in GitHub Desktop.
Maintain sessionstate in generic ashx handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment