RadStyleSheetManager (v 2013.1.417.35) not combining embedded Telerik stylesheets

4 posts, 0 answers
  1. Tim
    Tim avatar
    2 posts
    Member since:
    Aug 2013

    Posted 08 Aug 2013 Link to this post

    I have added RadStyleSheetManager to my page to combine all of the embedded CSS emitted for various Telerik controls (menu, grid, combobox, etc.) into a single request.

    Here's what the control looks like in the master page:

    <telerik:radstylesheetmanager runat="server" EnableStyleSheetCombine="true"></telerik:radstylesheetmanager>

    In my Web.config I have these:

    <system.web
        <handlers>
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
        </handlers>
    </system.web>

    and 

    <system.webServer
        <handlers>
            <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
        </handlers>
    </system.webServer>

    Unfortunately when I look at HTTP requests in Fiddle or Dev Tools I still see a bunch of individual requests for Telerik control CSS, e.g.:


    /WebResource.axd?d=s5NYJBI3nRAFreTQ7udQlKpAm2DSy9JAG88FYDPYUxF9i8rYngTROVT04Kc6cQFbg0elZBZAi-9MOFyZZXrIQPY8qxU7BLpExH2B449zx7DVia8sEcNgsjtoO2898ZLA7Ieljg2&t=635017187260000000

    What am I doing wrong?
  2. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    540 posts

    Posted 12 Aug 2013 Link to this post

    Hello, Tim.

    The requests you are seeing are not necessarily stylesheets. They could be as well other embedded resources such as core scripts (I can think of at least one core asp.net script) and embedded images.

    You can check the actual resources being loaded by using the approach explained in this blog post -- http://blogs.telerik.com/blogs/07-03-27/debugging-asp-net-2-0-web-resources-decrypting-the-url-and-getting-the-resource-name.aspx.

    Regards,
    Ivan Zhekov
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tim
    Tim avatar
    2 posts
    Member since:
    Aug 2013

    Posted 12 Aug 2013 Link to this post

    Hi Ivan,

    Thanks for your reply. Actually I checked that the resources were indeed CSS stylesheets by individually opening them in Dev Tools and looking at their contents.

    After a few changes to web.config that were seemingly unrelated to RadStyleSheetManager things somehow started working, i.e. the page now loads a single stylesheet with all Telerik CSS jammed together. I'm not sure what was it that fixed the problem but I'm happy as long as it works.
  5. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    540 posts

    Posted 15 Aug 2013 Link to this post

    Hi, Tim.

    The RadStylesheetManager has a property CombineStyleSheets, which is set to true by default. (That in terms is responsible for the combination of styles).

    Anyway, if you experience any other issues with the Stylesheet Manager, or any other control for that matter, do contact us back.

    Regards,
    Ivan Zhekov
    Telerik
    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 the blog feed now.
Back to Top