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!
Shane
jk*****@vt.edu