Custom Control: Image from resource at design time

M

Magnusb

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top