473,831 Members | 2,341 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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


Dec 15 '05 #1
1 1200
how about an httpmodule?

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

Dec 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1989
by: Hayden Kirk | last post by:
Hey I have a class called page. This class outputs a page in html. Now I have a function called OutPutHtml This outputs html, however I want to be able to do this: outputhtml('<body> <something');
5
4427
by: Justin Kennedy | last post by:
Hi, I have a client that wants to format content in Word, paste it into a textarea, and have the html render exactly as it matches the Word doc. I've tried some scripts out there that offer this, but most of them don't render the content exactly as it's displayed in Word. Do you know of any scripts/activex/applets that provide this?
5
3616
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an instruction document (not data based) - same as using an xml web control. The resulting html is on the client? but what about the server side of things? Trying to figure out how to change and save the xmlDocument. It I put a button OUTSIDE of the...
1
1679
by: sprash25 | last post by:
Hi, I am using a rich text editor (FCKEdit) on a webpage in which user can enter formatted text. The output of this control is HTML. Now on the code behind side, I need to change some of this HTML and then print the HTML (the pretty document - not the code) on the server printer. Any ideas??
19
3831
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
3
1968
sanjay123456
by: sanjay123456 | last post by:
Dear friends, <?php //define the receiver of the email $to = 'sanjay.mit@gmail.com'; //define the subject of the email $subject = 'Test HTML email'; //create a boundary string. It must be unique
33
2302
by: MC | last post by:
Hey, I have a need to get HTML from a client back to a server to do server processing. I would like the HTML and form data both. Is there a simple way to capture that? I do not want to submit the page...I will use ajax to send the data. I know how to get the elements but not the entire page or form. I am really just interested in specifying document.form2 and sending that.
8
5283
by: chromis | last post by:
Hi, I'm writing a contacts section for a cms on a website, I've decided to write the section in OO code. So far I have my Contacts object and a page structure I would use for a procedural site. /com/Contacts.cfc <cfcomponent displayname="Contact" output="false" hint="Contact component"> <!--- properties: used for self-documentation ---> <cfproperty name="dsn" displayname="dsn" hint="Contact id (UUID)" type="string" required="false"...
1
3333
by: chromis | last post by:
Hi, I'm having trouble fully implementing the edit section of a contact admin system, so far I have written the following: - Bean (Contact.cfc) - Data Access object (ContactDAO.cfc) - Gateway (ContactGateway.cfc) - index.cfm - Deals with the business logic - display/form.cfm - Produces the form for both add and edit behaviour
0
9793
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10777
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9317
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5619
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3963
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.