StyleSheetManager Folder?

8 posts, 0 answers
  1. David Beck
    David Beck avatar
    38 posts
    Member since:
    Jun 2010

    Posted 19 Jan 2011 Link to this post

    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>
  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 20 Jan 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cristos Alberto
    Cristos Alberto avatar
    1 posts
    Member since:
    Nov 2010

    Posted 28 Jun 2011 Link to this post

    How would I add more than one folder?
  5. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 30 Jun 2011 Link to this post

    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.

  6. Rambo the Dog
    Rambo the Dog avatar
    13 posts
    Member since:
    Feb 2010

    Posted 06 Sep 2012 Link to this post

    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>


     

     

     

  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 11 Sep 2012 Link to this post

    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.
  8. Kyle
    Kyle avatar
    7 posts
    Member since:
    Apr 2012

    Posted 15 Oct 2014 Link to this post

    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?
       
      

























  9. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 15 Dec 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017