Use Resource Files to set Image URL

2 posts, 1 answers
  1. Tracy
    Tracy avatar
    118 posts
    Member since:
    Nov 2010

    Posted 09 Mar 2012 Link to this post


    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



    ="<%$ 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
  2. Answer
    Slav avatar
    1351 posts

    Posted 14 Mar 2012 Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top