Question on 2010 SP1

11 posts, 1 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 15 Dec 2010 Link to this post

    What does this mean?

    Improved: RadStyleSheetManager to combine style sheets in a designated external folder

    We can combine css not in assemblies now?
  2. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 21 Dec 2010 Link to this post

    Hello Steve,

    Yes, with Q3 2010 SP1 RadStyleSheetManager is able to serve and/or combine external style sheet files. There are a few requirements, though, which you should have in mind when using the feature.

    First, the folder which contains the style sheet files must be explicitly stated in the web.config of the application:
    <appSettings>
      <add key="Telerik.Web.UI.StyleSheetFolder" value="~/StyleSheets"/>
    </appSettings>

    Additionally the folder must be inside the application's folder tree. Then you can register the individual style sheet files in RadStyleSheetManager:
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        <StyleSheets>
            <telerik:StyleSheetReference Path="~/StyleSheets/StyleSheet1.css" />
            <telerik:StyleSheetReference Path="~/StyleSheets/Base/StyleSheet2.css" />
        </StyleSheets>
    </telerik:RadStyleSheetManager>

    Finally the external style sheet files must be inside the targeted folder as otherwise a server-side exception will be thrown.

    I hope this information helps.

    Regards,
    Simon
    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. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 21 Dec 2010 Link to this post

    It helps, and it's awesome!

    :D 

    Thanks so much guys, this has been on my wishlist forever.

    Now since you're running it through a pipe to combine, is it also minifying?...if not...can it? :)
  5. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 21 Dec 2010 Link to this post

    Is there a way to specify multiple folders in the web.config entry?
  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 22 Dec 2010 Link to this post

    Hi Steve,

    External style sheets are run through the same pipeline as embedded ones, i.e. they are combined and compressed (if either or both are turned on).

    Currently there is no way to specify multiple folders, however, we will implement this in the upcoming weeks.

    I hope this helps.

    All the best,
    Simon
    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.
  7. RRT
    RRT avatar
    8 posts
    Member since:
    Jun 2009

    Posted 31 Dec 2010 Link to this post

    Can you explain to me why we even need to specify the directories? This was a nice first step, but what I need is something like RadScriptManager. Why can't I just do:

    <CompositeStyleSheet>
    <StyleSheets>
    ...
    </StyleSheets>
    </CompositeStyleSheet>

    I have css files in multiple locations, having to specify directories will be a pain. I think the ideal would be to make this work just like RadScriptManager. Is there a reason why it's done so differently?
  8. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 04 Jan 2011 Link to this post

    Hello Steve,

    Yes, we have implemented the 'target folder' approach because of the fact that a malicious user can craft a URL that can fetch any file from the project file structure. Pointing out the allowed folders resolves this potential security hole as in this way we can deny access to any requested file outside the designated folder.

    ScriptManager (and RadScriptManager in particular) work in the same way internally however the ASP.NET Framework handles the security checks.

    I hope this sheds more light on the matter.

    Greetings,
    Simon
    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.
  9. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 01 Mar 2011 Link to this post

    What's the syntax to get the mutliple folders?  I see the notes in the last release that it can support more than one folder now...

    This doesn't seem to work

    The style sheet '~/styles/common/commonnew.css' is not located in any of the 'Style Sheet' folders designated in the web.config.



    <telerik:RadStyleSheetManager ID="stylesheetManager" runat="server" CdnSettings-TelerikCdn="Disabled" >
        <StyleSheets>
            <telerik:StyleSheetReference Path="~/styles/common/commonnew.css" />
            <telerik:StyleSheetReference Path="~/Skins/MedportalGrey/PanelBar.MedportalGrey.css" />
        </StyleSheets>
    </telerik:RadStyleSheetManager>


    <add key="Telerik.Web.UI.StyleSheetFolder" value="~/Skins/Medportal,~/styles/common,~/styles" />
  10. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 01 Mar 2011 Link to this post

    **REMOVED**
  11. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 05 Jul 2011 Link to this post

    What should this work with 2010.2.929.20 ?

    I still get the error -- (Object instance exception)

    EDIT: Yeah -- I tried the latest available trial and that worked instantly.
    Is there a hot fix for just this issue since my upgrade rights have expired?
  12. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 11 Jul 2011 Link to this post

    Hello Matt,

    We are unable to provide you with a hot fix, you should upgrade if possible.

    Regards,
    Dimitar Terziev
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

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