G
Guest
Please don't ask me why I'm doing this (trust me, it makes sense in my system), but I'd like to basically redirect requests for a certain extension (thus a handler) to an ASPX page behind the scenes.
I've created a handler and set it up to handle the extension in question. In my ProcessRequest, I'd like to basically figure out which ASPX page to "forward" the request to. I've tried all sorts of methods (Server.Transfer and Server.Execute for instance), but they all have their downfall.
One problem is the ASPX page in question always sets his form "action" to the name of his own page (ending in ASPX). I'd like the "action" to be the URL I'm currently at (which will in turn eventually get handled by the same ASPX page). I figured out a cheesy way to get the action to properly have the correct output by using the Server.Execute overload that allows you to redirect the output to a TextWriter and then modifying the output and sending that out. The problem with that approach is now the IsPostback of the actual page never thinks it's a post back and controls never get their events fired.
Does anyone know of a way to do what I'm trying to do?
I've created a handler and set it up to handle the extension in question. In my ProcessRequest, I'd like to basically figure out which ASPX page to "forward" the request to. I've tried all sorts of methods (Server.Transfer and Server.Execute for instance), but they all have their downfall.
One problem is the ASPX page in question always sets his form "action" to the name of his own page (ending in ASPX). I'd like the "action" to be the URL I'm currently at (which will in turn eventually get handled by the same ASPX page). I figured out a cheesy way to get the action to properly have the correct output by using the Server.Execute overload that allows you to redirect the output to a TextWriter and then modifying the output and sending that out. The problem with that approach is now the IsPostback of the actual page never thinks it's a post back and controls never get their events fired.
Does anyone know of a way to do what I'm trying to do?