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

How do I create an imagebutton with a telerik icon?

3 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Javier
Top achievements
Rank 1
Javier asked on 05 Aug 2011, 05:29 PM
I'm using a radgrid right now, and I want to include some specific functionality.  I want to use the skin icons as for my custom imagebuttons.

How would I get the webresource url to use as the image url for any of the icons listed in the link below?

http://www.telerik.com/help/aspnet-ajax/grid-appearance-skins.html


I came across this thread

http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-use-the-telerik-icons-in-html.aspx

but the technique listed here doesn't work for me.  I'm just getting a broken image link.

Thanks,
Javier

3 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 11 Aug 2011, 08:38 AM
Hi Javier,

With an image button, the image url can be set in Page_PreRender in this scenario in order to work:
protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
    ImageButton1.ImageUrl=ClientScript.GetWebResourceUrl(typeof(RadGrid), "Telerik.Web.UI.Skins.Telerik.Grid.Edit.gif");
}

Kind regards,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Javier
Top achievements
Rank 1
answered on 11 Aug 2011, 03:35 PM
Thank you very much, that worked perfectly.  I'm also trying to add the progress gif from the RadAjaxLoadingPanel to another area.  Do you know what that gif name would be?  Is there a resource where I can find all the gif's available to us?

Thanks,
Javier
0
Tsvetina
Telerik team
answered on 16 Aug 2011, 11:42 AM
Hello Javier,

You could try with:
ClientScript.GetWebResourceUrl(typeof(RadAjaxLoadingPanel), "Telerik.Web.UI.Skins.WebBlue.Ajax.WebBlue.gif");

Generally, you could follow the structure of the Skin folder inside your RadControls installation directory. The folders and names will correspond to the path that you need to use.

Regards,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Javier
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Javier
Top achievements
Rank 1
Share this question
or