HTML overwritten by Response.OutputStream.Write

Discussion in 'ASP General' started by Richard, Jan 2, 2004.

  1. Richard

    Richard Guest

    I'm working on a site that creates mailing labels. When a label is
    generated, two things happen in the background with the image.

    First, it is saved as a smaller low-quality .gif on the server and
    then presented as a preview using an img tag (also later used for a
    history feature on the site).

    Second, when the user clicks on the image, a new window appears with
    only the mailing label as a high-quality .png graphic. I don't save
    the .png image to conserve hardrive space, so I use
    response.outputstream.write to output the image array. I do this
    because it is important to have crisp barcodes on the labels.

    The problem is that by doing this, the html in the aspx file isn't
    sent to the client, just the image. I would like to use
    window.print() on the client side. I tried using
    Page.RegisterStartUpScript; it runs, but isn't output to the user no
    matter if it is ran before or after the OutputStream.

    Anyone else seen a similar problem?

    Is there a way to display an image that is in server memory to an
    image tag?
    Richard, Jan 2, 2004
    #1
    1. Advertising

  2. Richard

    Bob Barrows Guest

    Richard wrote:
    > The problem is that by doing this, the html in the aspx file isn't


    This is a classic asp newsgroup. While you may be lucky enough to find a
    dotnet-savvy person here who can answer your question, you can eliminate the
    luck factor by posting your question to an appropriate group. I suggest
    microsoft.public.dotnet.framework.aspnet.

    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, Jan 2, 2004
    #2
    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. Ryan Hartman

    large files via Response.OutputStream.Write

    Ryan Hartman, Nov 4, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    7,284
    Ryan Hartman
    Nov 11, 2003
  2. Richard
    Replies:
    3
    Views:
    3,560
    Craig Deelsnyder
    Jan 2, 2004
  3. André
    Replies:
    3
    Views:
    1,882
    André
    Dec 1, 2006
  4. Replies:
    2
    Views:
    3,559
  5. Victor
    Replies:
    3
    Views:
    725
    Victor
    May 9, 2007
Loading...

Share This Page