E
Emil Christopher Melar
I wanted to use App_Theme, because then I might have some automation
when it comes to not hard coding paths for the css.
And as you know, you know that mozilla and IE renders differently, and
they require different style sheets:
Solution is as follows:
<link rel="stylesheet" href="default.css" type="text/css" media="all"
title="Default styles" />
<!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" media="all"
title="IE-specific styles" />
<![endif]-->
The problem is that SetStyleSheet() in PageTheme class can't be
overriden because it's internal (And Page calls it from outside).
It can't be used by the developer in any way, only in the runtime as
MSDN says:
"Page and control developers do not use the ControlSkinDelegate,
ControlSkin, or /PageTheme/ classes directly. These classes are used by
the ASP.NET parser and runtime to apply style sheet elements that are
defined in ASP.NET themes and control skins files to pages and specific
types of controls."
So here I am, thinking that App_Theme won't do me anything good, because
I already got classes and stylesheets done, and I have made my own local
resource provider to become global, so that I can use meta:resourcekey
globally. So the only reason for me to use App_Theme was the automatic
stylesheet output (which can't be overridden) and the possibility to
actually have different themes without _hardcoding_ anything.
---
Is there a way to solve this (in an elegant manner)?
I can't even access the LinkedStyleSheets property on PageTheme because
it's protected, and inheriting from that class won't do me any good.
If not, PLEASE make PageTheme class a provider, just like the
<globalization resourceProviderFactoryType .. /> !
Thanks in advance!
when it comes to not hard coding paths for the css.
And as you know, you know that mozilla and IE renders differently, and
they require different style sheets:
Solution is as follows:
<link rel="stylesheet" href="default.css" type="text/css" media="all"
title="Default styles" />
<!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" media="all"
title="IE-specific styles" />
<![endif]-->
The problem is that SetStyleSheet() in PageTheme class can't be
overriden because it's internal (And Page calls it from outside).
It can't be used by the developer in any way, only in the runtime as
MSDN says:
"Page and control developers do not use the ControlSkinDelegate,
ControlSkin, or /PageTheme/ classes directly. These classes are used by
the ASP.NET parser and runtime to apply style sheet elements that are
defined in ASP.NET themes and control skins files to pages and specific
types of controls."
So here I am, thinking that App_Theme won't do me anything good, because
I already got classes and stylesheets done, and I have made my own local
resource provider to become global, so that I can use meta:resourcekey
globally. So the only reason for me to use App_Theme was the automatic
stylesheet output (which can't be overridden) and the possibility to
actually have different themes without _hardcoding_ anything.
---
Is there a way to solve this (in an elegant manner)?
I can't even access the LinkedStyleSheets property on PageTheme because
it's protected, and inheriting from that class won't do me any good.
If not, PLEASE make PageTheme class a provider, just like the
<globalization resourceProviderFactoryType .. /> !
Thanks in advance!