您的位置:首页 > 编程语言 > ASP

Is it possible to make asp.net themes available to all sites on the sever?

2007-05-28 13:16 267 查看
By default ASP.NET 2.0 Themes include all Style Sheets found within the active Theme directory into the HEAD of the document. This severely limits many CSS features and in many cases makes things more difficult then they have to be. Read more here: The Problems with Themes, Skins, and Cascading Style Sheets (CSS) - Where it all Falls Apart. One of my favorite solutions to this problem is to use the VirtualPathProvider (VPP) to exclude all the StyleSheets from auto inclusion (or selectively include a single StyleSheet like Import.css). Read more about the VPP here: A Resolution to The Problems with Themes, Skins, and Cascading Style Sheets (CSS) - Putting the Cascades back into ASP.NET 2.0 Themes (taking control over CSS Cascades / Load Order, Media Types, and Overrides).

In your case you may want to use the VPP, then place a ContentPlaceHolder within the HEAD of your page - this would allow you to load your Style Sheets on a per page basis.

 

http://adam.kahtava.com/journal/CategoryView,category,Themes%20and%20Skins.aspx#a4df765e2-b408-471e-9999-652cd804b683

 

http://adam.kahtava.com/journal/CategoryView,category,Themes%20and%20Skins.aspx#acccb1beb-f995-47ca-92ba-137b7d73f082

 
I was able to answer my own question.

 The answer is Global Themes and you can find info about them here...

http://www.codeproject.com/aspnet/ThemesAndSkins.asp
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐