Server Control Embedded Resources on live server

Posted by Community Admin on 05-Aug-2018 19:36

Server Control Embedded Resources on live server

All Replies

Posted by Community Admin on 21-Jan-2011 00:00

I have created a server control that embeds the images and css into the resource file. I have made sure that the following is true:

resources are marked as embedded resource
I have included them in the assemblyinfo.cs 
I have put the <%= Webresource("Namespace.Resource.path")%> reference into the css
I have included a ResourceLinks control to embed the css in the page
I have tried both UseEmbeddedThemes set to true and false

On localhost, It resolves resources properly. The control works as expected in all aspects.  When I move it to production, It is not resolving the resources into the WebResource.axd url as expected, but instead uses the namespace path specified in the css. 

Any thoughts on this? I have looked at it too long. I hate when my developers tell me "Well, it works on my machine".

Thanks,
JT

Posted by Community Admin on 26-Jan-2011 00:00

Hi John Tolar,

You have to set Static property of the Resource file to true:

Copy Code
<sitefinity:ResourceLinks runat="server">
    <sitefinity:ResourceFile Name="SocialWidgetsContrib.Resources.SocialWidgetsContrib.css" AssemblyInfo="NewsRotator.Rotator, NewsRotator" Static="true" />
</sitefinity:ResourceLinks>

Static resources will not be pulled from the theme folder, but rather a full URL for external or full resource name for embedded resources should be used.

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

This thread is closed