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

StyleSheetManager Folder?

7 Answers 832 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
David Beck
Top achievements
Rank 1
David Beck asked on 19 Jan 2011, 11:32 PM
I get the below error when trying to use the StyleSheetManager

The 'Telerik.Web.UI.StyleSheetFolders' key is missing from the <appSettings /> section of the application's web.config file.
This setting is required when registering external style sheet files in RadStyleSheetManager.

<telerik:RadStyleSheetManager ID="oStyleSheetManager" runat="server">
        <StyleSheets>
            <telerik:StyleSheetReference Path="css/DivRoundedCornerBlack.css"/>
        </StyleSheets>

7 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 20 Jan 2011, 10:04 AM
Hi David,

We made some changes in order to support multiple external folders. You need to add the following key in the web.config:

<appSettings>
    <add key="Telerik.Web.UI.StyleSheetFolders" value="~/MyCssFolder" />
</appSettings>

Regards,
Helen
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
Cristos Alberto
Top achievements
Rank 1
answered on 28 Jun 2011, 11:26 PM
How would I add more than one folder?
0
Helen
Telerik team
answered on 30 Jun 2011, 10:25 AM
Hi Cristos Alberto,

You should divide them by semicolon:

<appSettings>
    <add key="Telerik.Web.UI.StyleSheetFolders" value="~/Styles;~/Styles1" />
</appSettings>


Regards,
Helen
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
Rambo the Dog
Top achievements
Rank 1
answered on 06 Sep 2012, 03:58 PM

Help! I'm on the latest release bits,  I cannot get RadStylehseetManager to accept multiple paths

HTML1
The style sheet '~/CSS/StyleSheet1.css' is not located in any of the 'Style Sheet' folders designated in the web.config.

HTML2
Failed to map the path '/CSS/StyleSheet1.css'.

Web.Config
 
<appSettings>
    <add key="Telerik.Web.UI.StyleSheetFolder" value="~/App_Themes;~/CSS;~/CSS2" />
  </appSettings>
 
HTML
    <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1">
        <StyleSheets>
            <telerik:StyleSheetReference Path="~/CSS/StyleSheet1.css" />
            <telerik:StyleSheetReference Path="~/CSS2/StyleSheet2.css" />
        </StyleSheets>
    </telerik:RadStyleSheetManager>

HTML2

<telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1">
<StyleSheets>
<telerik:StyleSheetReference Path="/CSS/StyleSheet1.css" />
<telerik:StyleSheetReference Path="/CSS2/StyleSheet2.css" />
</StyleSheets>
</telerik:RadStyleSheetManager>


 

 

 

0
Kate
Telerik team
answered on 11 Sep 2012, 10:19 AM
Hi Dan,

In general when using the RadStyleSheetManager in your application the paths set in the web.config file need to be relative to the root of the application as explained in the Serving external style sheets help article. Also when you register the stylesheets in the RadStyleSheetManager the paths to the files can be relative to the root or to the folder containing the current page. Please take a look at the above mentioned help article and in case this does not help I would ask you to open a support ticket where you can attach a very simplified runnable project so I ca test you scenario locally and help you out. 

Greetings,
Kate
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.
0
Kyle
Top achievements
Rank 1
answered on 15 Oct 2014, 08:18 PM
My application uses the configSource property to specify a file for appSettings like this:

 <!-- Stored in a seperate file because some settings are environment specific --> 
  <appSettings configSource="App_Data\AppSettings.config" />

When I do that, all settings work fine except for the Telerik.Web.UI.StyleSheetFolders setting. So, two questions:

1. If the path is specified in the Path property of the StyleSheetReference, then why do we need to specify a folder? It seems redundant.   
     
2. If, for whatever reason, the StyleSheetFolders appSetting is required, then why doesn't it work if it is specified in a separate file specified by configSource?
   
  

























0
Dimitar Terziev
Telerik team
answered on 15 Dec 2014, 09:41 AM
Hello,

Regarding your questions:

1. If the path is specified in the Path property of the StyleSheetReference, then why do we need to specify a folder? It seems redundant.    - This has been done for security reasons, but it is already redundant and we will remove it soon.
     
2. If, for whatever reason, the StyleSheetFolders appSetting is required, then why doesn't it work if it is specified in a separate file specified by configSource?- In general there should be no problem defining the app Settings in a separate configuration file.

Regards,
Dimitar Terziev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ScriptManager and StyleSheetManager
Asked by
David Beck
Top achievements
Rank 1
Answers by
Helen
Telerik team
Cristos Alberto
Top achievements
Rank 1
Rambo the Dog
Top achievements
Rank 1
Kate
Telerik team
Kyle
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or