can i modify the content in the buffer of response(not response.buffer prep)

B

Bob Barrows

xingye wrote:

If I understand your question, then the answer is no.

Bob Barrows
 
M

Maarten

Use a variable to keep your data. In the process, before the Response.Write
you can alter the content with replace or another Function to handle more
complex changements in the content of the variable. In many case you will
need pointer to indicate start and end of pieces of data. Before
Response.Wriet you need to clean-up these pointers.
Maarten.
 
X

xingye

i want to modify entire page. sometimes i must design the webpage complex
static html and asp script. so i can't put all this into a variable:(

now i think i can use xmlhttp component. but this way more like using an
agent, i must supply another page...
 
M

Maarten

Maybe break up the page in pieces (html / asp / etc). Write down this pieces
in tmpFiles or use different variables or make use of a database to store
the different elements. If neccessary in the proces, you can open those
files or records for altering. At the end you collect all the pieces into 1
output.
Maarten
 
M

Maarten

I presume you wish to alter the page on Server Side (before it is send to
the client) and that you understand the difference between Server Side and
Client Side. If you wish to alter some of the page elements (frames /
pictures) after the page is loaded into the client browser, then you need to
do this with Javascript code.
Maarten.
 
X

xingye

Yes, I understand server side and client side.

I want to Change the page at server side. I want to translate then page from
one language to the other.....
 
M

Maarten

If i understand: you wish to retrieve a existing page on the internet and
translate it into another language and send it to the client. Or do you self
produce the page?
 
X

xingye

Just It! But How to do :p

Andrew Urquhart said:
You're looking for the same functionality that PHP has whereby the
buffer can be read and modified programmatically. I think you'll only
get what you're looking for if you create your own buffer, e.g. create a
mechanism to pipe all of your output to an array or a file.
--
Andrew Urquhart
- FAQ: www.aspfaq.com
- Archive: www.tinyurl.com/38kzx
- Contact: www.andrewu.co.uk/contact/
- Employ me: Front/middle tier ASP developer with WAI & web standards
 
M

Michael Lu

Let me guess... you want to generate a page (which contains either
simplified or traditional chinese characters, or even both) and you want
to target an audience containing all kinds of people who speak Chinese.
You want to modify the page so that it will only display simplified
Chinese or traditional Chinese based on user locale. You want to read
Response.OutputStream and manipulate it but unfortunately you can not
read it. It would be a miracle if I am right at this point, since I am
having this problem I just described. :) If this is true, I probably
went a little furthur than you did. Read
http://aspalliance.com/articleViewer.aspx?aId=71&pId= and
http://www.codeproject.com/useritems/Chinese_Style_Converter.asp (assume
my guess is right :) ). But wait, there is a problem: the filter works
the first time you modify the stream, but if you do a postback,
viewstate gives you problems as described by Robert. How to solve that
problem? I do not know yet, but I think in addition to using
Response.Filter, you can save and load viewstate to and from persistent
medium like files or database (you need to override 2 functions named
Load/Save...Medium, dont remember). That I have not tried and is the
only thing I can think of. BTW, please let me know if you find some
solution to your problem.
 

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

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top