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

using images from assembly

2 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 01 Jul 2008, 11:25 PM
hello,

i am using the latest RadGrid release. in it, i have some custom Command items. i would like to use some image icons for my command items, but i want to use the default ones that are embedded w/i the assembly.

since the RadControls no longer use the file system for resource storage, how do i go about referring to an embedded resource? i need to do this in the ASPX.


thanks!
matt

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 02 Jul 2008, 06:53 AM
Hello Matt,

Here is how:

<%= Page.ClientScript.GetWebResourceUrl(RadGrid1.GetType(), "Telerik.Web.UI.Skins.SkinName.Grid.ImageName.gif") %>

The above returns a string, which can be used as an image URL. For example:

<img src='<%= Page.ClientScript.GetWebResourceUrl(RadGrid1.GetType(), "Telerik.Web.UI.Skins.Default.Grid.SortAsc.gif") %>' />

Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
matt
Top achievements
Rank 1
answered on 02 Jul 2008, 07:14 PM
thanks!
Tags
Grid
Asked by
matt
Top achievements
Rank 1
Answers by
Dimo
Telerik team
matt
Top achievements
Rank 1
Share this question
or