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
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
相关文章推荐
- Is it possible to make asp.net themes available to all sites on the sever?
- It is not possible to run two different versions of ASP.NET in the same IIS process
- It is not possible to run two different versions of ASP.NET in the same IIS process.问题的解决
- It is not possible to run two different versions of ASP.NET in the same IIS process:IIS
- ASP.Net DebugError解决方案[转]:Unable to start debugging on the web server.Debugging failes because integrated Windows authentication is not enabled.
- Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL serve
- A ScriptManager is required on the page to use ASP.NET AJAX Script Components
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- 解决php的“It is not safe to rely on the system’s timezone settings”问题
- PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings
- How to set the DefaultButton in a Page Based on ASP.NET Master Page
- Is it possible to get the difference from two dynamic arrays regardless of their order?
- PHP Warning: phpinfo(): It is not safe to rely on the system\'s timezone settings
- Is it possible to implement IPv6 on a virtual interface (eth0:1 interface) in Linux?
- Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
- home 解决php的“It is not safe to rely on the system’s timezone settings”问题
- 【Phpadmin】解决phpadmin的“It is not safe to rely on the system’s timezone settings”问题
- [转载]ASP.NET Error – Adding the specified count to the semaphore would cause it to exceed its maximum count
- VS.NET 2003 Error - The project you are trying to open is a Web project. You need to open it by specifying its URL path.
- Python 出现错误 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform.