How can I display a runtime image in internet explorer? Please Help me....

Discussion in 'ASP .Net' started by Sima, Jun 19, 2006.

  1. Sima

    Sima Guest

    Hi, All
    I want to develop a runtime image with "Bitmap" object in Asp.Net and then
    display it in my browser.
    I do it with this code :
    -----------------------------
    Bitmap bm=new Bitmap(100,100);

    Graphics g;

    g=Graphics.FromImage(bm);

    g.Clear(Color.White);

    g.DrawLine(Pens.Red,0,0,50,50);

    MemoryStream memo;

    memo = new MemoryStream();

    bm.Save( memo, System.Drawing.Imaging.ImageFormat.Bmp );

    memo.Close();


    Response.BinaryWrite( memo.ToArray() );

    ------------------------------------

    After that I run this code , the runtime bitmap is showing in Paint
    application. and not displayed it in my browser.
    Please help me.
    Best Regards,
    Sima
    Sima, Jun 19, 2006
    #1
    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. cmay
    Replies:
    0
    Views:
    1,131
  2. Joey
    Replies:
    1
    Views:
    483
    Laurent Bugnion [MVP]
    Feb 3, 2007
  3. Steve Kershaw
    Replies:
    0
    Views:
    415
    Steve Kershaw
    Aug 21, 2007
  4. Ed Hauptman
    Replies:
    7
    Views:
    1,016
    Ed Hauptman
    Aug 7, 2009
  5. John Smith
    Replies:
    1
    Views:
    142
    Evertjan.
    Mar 12, 2005
Loading...

Share This Page