Last post Mar 08, 2011 02:23 PM by cubangt
Mar 08, 2011 10:19 AM|cubangt|LINK
We have a handler to deal with .dat files.. everything is already setup and server is acknowledging the file type and doing its thing to handle it..
But the handler requires 1 bit of information along with the HTTP request which is a physical file path.. the file name it knows based on the file we call , but how can i pass a custom header along with the request so that the handler will use that when
the request is made?
Basically when on our player.aspx page, i will have a button, when you click that button a request is made to the .dat file, but along with that request i need to send the physical file path.. how can i do that?
Mar 08, 2011 10:26 AM|smirnov|LINK
What about query string? handler.ashx?path=somevalue
To obtain string in the handler
public void ProcessRequest(HttpContext context)
string path = "";
if (context.Request["path"] != null)
path = context.Request["path"];
Mar 08, 2011 10:51 AM|cubangt|LINK
If done this way wouldnt that expose the file path to the user? Working with custom handler is new to me and just trying to provide the other developer with the information he needs.
Mar 08, 2011 02:23 PM|cubangt|LINK
No need for a reply on this, found a solution that seems will work..
thanks for the suggestions..