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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值