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

App_Themes issue

1 Answer 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sups
Top achievements
Rank 1
Sups asked on 27 Jan 2009, 07:11 AM
Hello Telerik,

We have an issue of Themes, where unwanted css files also gets dwonloaded.

Following is the scenario:
1) Apply a theme to a page say Default. Set a grid and a menu control on that page. Set the skin of these controls to Default and also set EnableEmbeddedSkins to false. Make sure, the Grid.Default.css and Menu.Default.css are present in App_Themes\Default folder. Now, when this page is rendered, css gets linked to the page.
2) Now take another page. Add no rad controls to this page. Just apply the Theme to this page. Now, when the page is rendered, all the css files in the App_Themes\Default folder gets linked to this page. This is causing unnecessary download of css file making the page heavy.

Is there any workaround for this? Since we are using Themes in our application, we had to use this kind of senario.
Urgently awaiting for your reply.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 27 Jan 2009, 07:35 AM
Hi Sups,

This is how the ASP.NET theming mechanism works. ASP.NET loads all CSS files that are located inside a Theme no matter if they are used or not.

Greetings,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Sups
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or