Manipulate Page Theme Programatically
Posted
by Aren B
on Stack Overflow
See other posts from Stack Overflow
or by Aren B
Published on 2010-05-31T21:44:57Z
Indexed on
2010/06/01
2:33 UTC
Read the original article
Hit count: 335
I've got the following Setup in my Theme:
\App_Themes\Default\StyleSheet.css
\App_Themes\Default\PrintStyleSheet.css
The PrintStyleSheet.css
file has a set of printing css rules set in them wrapped in an @Media Print { }
block.
I need a way to programmatically remove the PrintStyleSheet.css
from the list of css files for ASP.NET to inject based on some flags. (Some instances we want to print the site verbatim without custom formatting).
I know i could build a seperate theme without the PrintStyleSheet.css
in it and switch the theme programmatically, however this would introduce duplication of my master stylesheet which is not acceptable.
Any ideas?
© Stack Overflow or respective owner