By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,365 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,365 IT Pros & Developers. It's quick & easy.

Examine/Edit html output before it's sent to the client

P: n/a
A customer would like to redirect visitors to a "goodbye" page when they
click on an outside link on their website. The website is quite large and I
would rather not wade thru all the existing content on aspx pages and the
database and edit every single outside link (and keep all new content that
contain outside links up to date).

I would like to grab the html before it's sent to the client, search for
outside links, edit the links and send the modified html to the client. I
have done this sort of thing before with server controls by overriding a
controls' render event.

I would prefer to do this in a global.asax event (for minimal work) -
something like the EndRequest event. I have access to the Response object
in this event - however I don't think I have access to the html being sent
to the client. Has it already been sent at this point? Is there no way to
do this sorta processing in an application event like this?

The only other option I can think of would be to make a base page that every
aspx page in my application inherits from - and override the render event of
that page to do my work. I would rather not do this because I would have to
edit every aspx page on my site - however if that's the only option I will
consider it.

Any advice or direction is really appreciated! Thanks in advance!



Dec 15 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
how about an httpmodule?

I believe dotnetnuke has something like this ... UrlRewrite ?

Dec 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.