An ImageButton that retrieves its image from a Resource

Discussion in 'ASP .Net Building Controls' started by ~~~ .NET Ed ~~~, Apr 2, 2005.

  1. 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

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

    ~~~ .NET Ed ~~~, Apr 2, 2005
    1. Advertisements

  2. ~~~ .NET Ed ~~~

    Brock Allen Guest

    Brock Allen, Apr 2, 2005
    1. Advertisements

  3. ~~~ .NET Ed ~~~

    Robert Rae Guest

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

    Can someone help with a small example or a link to documentation.
    Robert Rae, Jun 22, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.