ASP.NET site management

I have a mix of css in themes and generic (non-theme related) files. I would like css theme files to be included first in front of my custom css files - how to do this (see below, the StyleSheet.css file is the theme file that is always included last, I want it to be included first)

<!-- CSS needed on every page --> <link rel="Stylesheet" type="text/css" href="App_themes/PageLayout.css" /> <link rel="Stylesheet" type="text/css" href="App_themes/EmbedFonts.css" /> <!-- CSS placed by ASP.NET --> <link href="App_Themes/DarkTheme/StyleSheet.css" type="text/css" rel="stylesheet" /><title> 

Note. I use master pages with thematic web forms.

+4
source share
1 answer

EDIT:. Since you use only CSS drawing themes, use the StyleSheetTheme page property instead of the theme. This should cause your links to CSS pages to be first and not last, making them redundant. This is confirmed in the answer to this question .
This MSDN article explains the difference between the two properties, referring to how links will be displayed in the stylesheet.

Hope this helps.

+3
source

Source: https://habr.com/ru/post/1393843/


All Articles