You can pass the path to ashx handler via Session.
ashx file:
public class Handler : IHttpHandler, System.Web.SessionState.IReadOnlySessionState
{
public bool IsReusable { get { return true; } }
public void ProcessRequest(HttpContext ctx)
{
//get the path from Session
ctx.Response.Write(ctx.Session["key"]);
}
}
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Frank Jiang ...
All-Star
16006 Points
1728 Posts
Microsoft
Re: Best way to send data from class to generic handler
Aug 23, 2012 06:09 AM|LINK
You can pass the path to ashx handler via Session.
ashx file:
public class Handler : IHttpHandler, System.Web.SessionState.IReadOnlySessionState { public bool IsReusable { get { return true; } } public void ProcessRequest(HttpContext ctx) { //get the path from Session ctx.Response.Write(ctx.Session["key"]); } }Feedback to us
Develop and promote your apps in Windows Store