Save state when create image

Discussion in 'ASP .Net Web Controls' started by Mango, Feb 28, 2005.

  1. Mango

    Mango Guest

    Hi there, I will be very happy if someone helps me. I need to create dynamic
    image, and save the state between the postback. I mean I've got 5 buttons
    and when I click on one of them, the image is creted with:

    System.Web.UI.WebControls.Image Img1 = new
    System.Web.UI.WebControls.Image();

    Img1.ImageUrl = newPath;

    Panel1.Controls.Add(Img1);

    That's work fine but when I click on some of the other buttons I lost the
    Image.

    I tried this:

    System.Web.UI.WebControls.Image Img1 = new
    System.Web.UI.WebControls.Image();

    Panel1.Controls.Add(Img1);

    Img1.ImageUrl = newPath;

    But it does not help me. I cant use OnInit, so the only way which I know is
    to add image in design time and do it with Panel1.visible=false ,but I am
    looking for more intelligent way to do it.

    Any idea?
    Mango, Feb 28, 2005
    #1
    1. Advertising

  2. Mango

    Wilco Bauwer Guest

    Wilco Bauwer, Feb 28, 2005
    #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. Mike John
    Replies:
    0
    Views:
    492
    Mike John
    Jul 28, 2003
  2. Mango

    Save state when create image

    Mango, Feb 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    363
    Eliyahu Goldin
    Feb 28, 2005
  3. Julia
    Replies:
    2
    Views:
    1,815
    Julia
    Jun 27, 2005
  4. Daniel Mark
    Replies:
    1
    Views:
    698
    Fredrik Lundh
    Sep 25, 2006
  5. Mango

    Save state when create image

    Mango, Feb 28, 2005, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    95
    Wilco Bauwer
    Feb 28, 2005
Loading...

Share This Page