An ImageButton that retrieves its image from a Resource

  • Thread starter ~~~ .NET Ed ~~~
  • Start date
N

~~~ .NET Ed ~~~

Well, that sums it up, doesn't it? I would like to have an image button
(more compact than a regular button) in a web custom control. However, to
minimize dependencies and limit installation nuisances I was thinking of
retrieving the image of the image button from an embedded resource, only
that seems not to be possible because ImageButton has an ImageUrl property
and that alone is not enough.

I have seen an article where first the image was obtained from a resource
and then saving it to a file and then using that to feed to the ImageUrl
property. Problem with that -in addition of being extremely cumbersome- is
the need for write permissions.

I have tried to look for other alternatives but both Image and HtmlImage do
not accept a Bitmap object that could possibly be retrieved from an embedded
resource.

So.... is there anything like that out there? any ideas?

Thx,
Emil
 
R

Robert Rae

I can't find any documentation on retrieving an imagebutton's image from a
resource file in asp.net 2.0.

Can someone help with a small example or a link to documentation.
 

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,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top