Alter the HTML output before it's sent to the web browser, possible?

B

Brian Simmons

Hi,

Long story short: I've got a website built, and we moved it over to the
production server, which is an SSL-required (https://...) server.
A third party component that I'm using makes use of an <iframe>.
Unfortunately they set the SRC attribute to "".

This causes Internet Explorer to display a message box dialog warning about
this page contains non-secure and secure items, do you wish to display the
non-secure items, Y/N?

Very annoying as it happens on every page transition and having the
end-users switch their IE settings is not an option.

After some Googling, I discovered the ASP.net 2 menu control has the same
issue and Jerry Orman has the problem/solution listed on his blog:
http://blogs.msdn.com/jorman/archive/2006/02/06/526087.aspx

I contacted the 3rd party component vendor and they confirmed this issue was
a bug.

I'm not sure how long it's going to take them to fix the bug, and I need it
yesterday.

So, I'm wondering if this solution is possible and if so, how/where would I
do it?

I would like to capture the HTML output right before ASP.net hands it off to
IIS which sends it to the web browser.

And in that event where I capture the rendered HTML, do something like:

theHTMLOutput = theHTMLOutput.ToString().Replace(" src=\"\" ", "
src=\"https://mysite.com/blank.htm\" ")

Is it possible? Any tips/suggestions/code?

Thanks,
Brian
 
B

Brian Simmons

Hi Peter,

Thank you so much for Dino's blog post. It explained it pretty good, but by
using keywords in his article I was able to find this article with code
samples:
http://aspalliance.com/71

I implemented this technique on my site and it worked like a charm.

Thanks again (you, Dino and aspalliance were my lifesavers today),
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top