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

Discussion in 'ASP General' started by xingye, Apr 10, 2004.

  1. xingye

    xingye Guest

     
    xingye, Apr 10, 2004
    #1
    1. Advertising

  2. xingye

    Bob Barrows Guest

    xingye wrote:

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

    Bob Barrows


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows, Apr 10, 2004
    #2
    1. Advertising

  3. xingye

    Maarten Guest

    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.



    "xingye" <> schreef in bericht
    news:...
    >
    >
     
    Maarten, Apr 10, 2004
    #3
  4. xingye

    xingye Guest

    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...


    "Maarten" <> wrote in message
    news:f4Xdc.66798$-ops.be...
    > 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.
    >
    >
    >
    > "xingye" <> schreef in bericht
    > news:...
    > >
    > >

    >
    >
     
    xingye, Apr 11, 2004
    #4
  5. xingye

    Maarten Guest

    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

    "xingye" <> schreef in bericht
    news:...
    > 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...
    >
    >
    > "Maarten" <> wrote in message
    > news:f4Xdc.66798$-ops.be...
    > > 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.
    > >
    > >
    > >
    > > "xingye" <> schreef in bericht
    > > news:...
    > > >
    > > >

    > >
    > >

    >
    >
     
    Maarten, Apr 11, 2004
    #5
  6. xingye

    Maarten Guest

    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.


    "xingye" <> schreef in bericht
    news:...
    > 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...
    >
    >
    > "Maarten" <> wrote in message
    > news:f4Xdc.66798$-ops.be...
    > > 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.
    > >
    > >
    > >
    > > "xingye" <> schreef in bericht
    > > news:...
    > > >
    > > >

    > >
    > >

    >
    >
     
    Maarten, Apr 11, 2004
    #6
  7. xingye

    xingye Guest

    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.....
     
    xingye, Apr 11, 2004
    #7
  8. xingye

    Maarten Guest

    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?
     
    Maarten, Apr 11, 2004
    #8
  9. xingye

    xingye Guest

    Just It! But How to do :p

    "Andrew Urquhart" <> wrote in message
    news:Yy8ec.39$...
    > xingye wrote:
    > > 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.....

    >
    > 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
    >
    >
     
    xingye, Apr 12, 2004
    #9
  10. xingye

    Michael Lu Guest

    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.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Michael Lu, Apr 19, 2004
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jhon
    Replies:
    0
    Views:
    348
  2. jhon
    Replies:
    0
    Views:
    401
  3. Vijay
    Replies:
    1
    Views:
    582
    CBFalconer
    Jan 1, 2007
  4. Vijay
    Replies:
    0
    Views:
    512
    Vijay
    Jan 28, 2007
  5. Vijay
    Replies:
    0
    Views:
    1,128
    Vijay
    Aug 19, 2007
Loading...

Share This Page