By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,199 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,199 IT Pros & Developers. It's quick & easy.

App_Theme and <link rel="stylesheet" .. /> output problems.

P: n/a
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" />

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!
Emil Christopher Melar
Mar 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.