Wednesday 7 July, 2010

MAINTAIN SESSIONSTATE IN GENERIC ASHX HANDLER

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace MyGenericHandler
  6. {
  7. ///
  8. /// Summary description for $codebehindclassname$
  9. ///
  10. public class Handler : IHttpHandler, System.Web.SessionState.IRequiresSessionState
  11. {
  12. public void ProcessRequest(HttpContext context)
  13. {
  14. context.Session.Add("myVal", context.Request["myVal"]);
  15. }
  16. public bool IsReusable
  17. {
  18. get
  19. {
  20. return false;
  21. }
  22. }
  23. }
  24. }

No comments:

Post a Comment