Hi im trying to use a IHttpHandler to automatically add content to the webpage before displaying it to the user. I need to replace some text that appears on every page with html. Is there an easy way of doing this as i've been trying to attempt to do this
for a couple of days now.
Member
1 Points
5 Posts
IhttpHandler
Mar 21, 2006 11:54 AM|chris27uk|LINK
Hi im trying to use a IHttpHandler to automatically add content to the webpage before displaying it to the user. I need to replace some text that appears on every page with html. Is there an easy way of doing this as i've been trying to attempt to do this for a couple of days now.
Thanks
Member
10 Points
5 Posts
Re: IhttpHandler
Mar 21, 2006 03:26 PM|kobipinhasov|LINK
You should use HttpModule to accomplish this task.
It will allow you to catch events of the request pipeline for performing custom tasks.
In case you need just to append some text to each page leaving to client then handle EndRequest event of the application object.
If you need to replace/append some text then you will need to use Response.Filter property.
Here you can find some good examples.
I'm using this in my own applicatons.
Hope this helps