This is a migrated thread and some comments may be shown as answers.

Use Resource Files to set Image URL

1 Answer 162 Views
Button
This is a migrated thread and some comments may be shown as answers.
Tracy
Top achievements
Rank 1
Tracy asked on 10 Mar 2012, 02:16 AM
Hi,

I use resource files to store the images on my website but can't seem to get them to work on the rad button.  On an asp button I would just set the image URL to something like this

ImageURL

 

="<%$ Resources:Images,AddRecord16%>"

 


When I try to do this on a rad button the image doesn't show up.  I know the image exists because I use it on regular asp buttons. How do I set the image on a rad button using a resource file.

Thank You
Tracy

1 Answer, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 14 Mar 2012, 10:22 AM
Hi Tracy,

Note that the background image of a RadButton control should be set through its inner property Image as shown in this online demo. Also, the Width and Height properties of the control need to be specified when it is configured as an image button.

For your convenience I have attached a sample project that demonstrates the desired setup. Please use it as a reference for your further development.

Greetings,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Button
Asked by
Tracy
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or