473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Is there a way to intercept page HTML source before it's served

LP
Hi,

After html of .aspx page has been generated, but before it has been sent to
a client, I want to interecept it, and slightly modify it. I can't find
anyway to get html of a page. How can I do that? I need that because I need
to modify behaviour of a component that someone else wrote, but I don't have
its sourcecode. Thanks
Nov 19 '05 #1
5 1461
Could you inherit and override some of their methods?

"LP" <lp@a.com> wrote in message
news:ei*************@TK2MSFTNGP15.phx.gbl...
Hi,

After html of .aspx page has been generated, but before it has been sent to a client, I want to interecept it, and slightly modify it. I can't find
anyway to get html of a page. How can I do that? I need that because I need to modify behaviour of a component that someone else wrote, but I don't have its sourcecode. Thanks

Nov 19 '05 #2

"LP" <lp@a.com> wrote in message
news:ei*************@TK2MSFTNGP15.phx.gbl...
Hi,

After html of .aspx page has been generated, but before it has been sent to a client, I want to interecept it, and slightly modify it. I can't find
anyway to get html of a page. How can I do that? I need that because I need to modify behaviour of a component that someone else wrote, but I don't have its sourcecode. Thanks

Nov 19 '05 #3
For example: use Page.render() to get the rendered HTML source then modify
it and send it out by Response.write()... on PreRender event?

Not very sure about that.

"Peter Rilling" <pe***@nospam.rilling.net> ¦b¶l¥ó
news:O9*************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
Could you inherit and override some of their methods?

"LP" <lp@a.com> wrote in message
news:ei*************@TK2MSFTNGP15.phx.gbl...
Hi,

After html of .aspx page has been generated, but before it has been sent

to
a client, I want to interecept it, and slightly modify it. I can't find
anyway to get html of a page. How can I do that? I need that because I

need
to modify behaviour of a component that someone else wrote, but I don't

have
its sourcecode. Thanks


Nov 19 '05 #4
Hello lp,

I think you probably want to look at the HttpResponse.Filter [1] property.
This is a Stream derived class that you can hook up to do whatever you need
with the response stream prior to it being sent to the client. Here [2] is
an example.

[1] http://msdn.microsoft.com/library/de...ilterTopic.asp
[2] http://dotnetjunkies.com/WebLog/donn...9/08/1468.aspx

Enjoy!

--
Matt Berther
http://www.mattberther.com
Hi,

After html of .aspx page has been generated, but before it has been
sent to a client, I want to interecept it, and slightly modify it. I
can't find anyway to get html of a page. How can I do that? I need
that because I need to modify behaviour of a component that someone
else wrote, but I don't have its sourcecode. Thanks


Nov 19 '05 #5
This articles demonstrates a variety of ways to intercept http
requests and do things with them and to them. Do a page
search on the word: FilterHtml

http://www.eggheadcafe.com/articles/hijacksession.asp

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/foru...t10017013.aspx
http://www.eggheadcafe.com/articles/..._generator.asp

"LP" <lp@a.com> wrote in message
news:ei***************@TK2MSFTNGP15.phx.gbl...
Hi,

After html of .aspx page has been generated, but before it has been sent
to
a client, I want to interecept it, and slightly modify it. I can't find
anyway to get html of a page. How can I do that? I need that because I
need
to modify behaviour of a component that someone else wrote, but I don't
have
its sourcecode. Thanks

Nov 19 '05 #6

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

Similar topics

0
by: zoltix | last post by:
Hi, I am beginner in aspx. I would like to intercept all click events on my document. I use this function in javascipt for that document.onmousedown=click;. It works well. But I would...
2
by: Ben de Vette | last post by:
Hi, When a user submits a form I want to return him/her a page, but at the same time I want to send him/her an exact copy of this page by mail. Is there a way to intercept the rendered HTML of...
25
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
2
by: rpale | last post by:
We want to create server-side code that will retrieve the user requested pages, then manipulate the content of those pages just before being sent back to the user. We tried the following: ...
82
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility...
10
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
7
by: VK | last post by:
Is it possible to include SVG object right onto HTML page in Firefox 1.5? (I mean native SVG, not SVG plugin) .... <svg> .... </svg> All samples on mozilla.org are either stay-alone .svg...
1
by: Matt Walker | last post by:
I decided to flesh out my php skills by building a web application which could scan through local files on my intranet (specifically mapped drives on my server) and generate a list of Movies or...
3
by: alice | last post by:
I've been trying for a long time to figure this out, to have a page with several MP3 clips, and each one having a custom start and stop button next to them to play the track. I finally found a bit...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.