Re: Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes
From: Kevin Spencer (kevin_at_takempis.com)
Date: 03/04/04
- Next message: Joe: "Re: Geeting ImageUrl when changed by javascript"
- Previous message: Eric Lawrence [MSFT]: "Re: MSOffice and ASP.NET"
- In reply to: Kentamanos: "Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes"
- Next in thread: Kentamanos: "Re: Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes"
- Reply: Kentamanos: "Re: Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Mar 2004 15:34:46 -0500
Why don't you just assign ASP.Net as the handler for this extension? Then
you don't need an HttpHandler to redirect. ASP.Net will handle the request,
and your ASP.Net pages would just have to have the same extension.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things. "Kentamanos" <anonymous@discussions.microsoft.com> wrote in message news:2F1D78A9-5663-4605-A386-05578BFB7AF3@microsoft.com... > 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?
- Next message: Joe: "Re: Geeting ImageUrl when changed by javascript"
- Previous message: Eric Lawrence [MSFT]: "Re: MSOffice and ASP.NET"
- In reply to: Kentamanos: "Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes"
- Next in thread: Kentamanos: "Re: Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes"
- Reply: Kentamanos: "Re: Using an HttpHandler to redirect a certain extension to ASPX pages behind the scenes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|