Last post Sep 20, 2006 02:17 PM by tdavisjr
Sep 20, 2006 12:56 AM|Scott927|LINK
I'm completely new to HTTPHandlers and HTTPModules. Is there a way (preferably without modifying each web.config -- i need to implement this server-wide) that I can intercept a web request, and replace static HTML on the page with custom HTML? For example,
let's say someone loads default.aspx, which contains the following:
this is some text
I want to intercept the request and have the following output to the browser:
this is modified text
Is this possible?
Sep 20, 2006 08:50 AM|JeffreyABecker|LINK
Sep 20, 2006 02:17 PM|tdavisjr|LINK
Yes, this can be done, its a little tricky; but possible. You need to look into using Request Filters. The Request object as a Filter propery which is a stream that hold the textual data in binary format. Please see the below articles:
Also, they may also have a forum that may talk about this as well.
ASP.NET Request Filters