Custom Control: Image from resource at design time

Discussion in 'ASP .Net' started by Magnusb, Jan 27, 2010.

  1. Magnusb

    Magnusb Guest

    I have developed a small (composite) custom control. One of the child
    controls (and the only one visible) is an asp:image. I have embedded the
    image as a resource in the Custom Control dll. At runtime I set the
    ImageUrl in onLoad using "Page.ClientScript.GetWebResourceUrl"

    This works fine but the image will not display when in the designer. if
    I hard code the ImageUrl pointing to the image which I also have in my
    web site project it will show correctly in designer. But this is of
    course no a good design because it will not display the icon (at design
    time) if the file structure is changed.

    How can I use the embedded image at design time?

    This is VS 2008.

    I create the Controls I use in my control in CreateChildControls().

    Thank you
    Magnusb, Jan 27, 2010
    #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. Replies:
    0
    Views:
    718
  2. Ravi Ambros Wallau
    Replies:
    0
    Views:
    4,087
    Ravi Ambros Wallau
    Jun 1, 2005
  3. Replies:
    1
    Views:
    374
    Teemu Keiski
    Jul 2, 2003
  4. Ravi Ambros Wallau
    Replies:
    0
    Views:
    310
    Ravi Ambros Wallau
    Jun 1, 2005
  5. Justin
    Replies:
    12
    Views:
    552
    Justin
    Jul 8, 2005
Loading...

Share This Page