ASP.NET Themes Order of Priority

InterServer Web Hosting and VPS

ASP.NET Themes Order of Priority

Here we have a quick look at ASP.NET Themes Order of Priority, as in the various ways to apply themes, and the order of priority they take once they are applied.

1. In Page_PreInit set Page.Theme = "Level6";
2. @Page Theme="Level5"
3. web.config <pages Theme="Level4">
4. Control attribute settings eg CssClass="bold"
5. @Page StyleSheetTheme="Level2"
6. web.config <pages StyleSheetTheme="Level1">

Theme or StyleSheetTheme

Setting Theme, instead of the StyleSheetTheme, whether your setting this in the web.config, or the page, decides whether the setting can be overridden by values set on individual controls. If you set the Theme, either in the web.config or the page, this theme will be the one used, even if you set attributes on the controls, those controls will be ignored, So setting Theme, you are pretty much enforcing the Theme for the site(web.config) or the page (@Page Theme=). Setting the StyleSheetTheme instead (web.config for the site, or in the Page just for that page), means that individual control's can be set which will override the settings in StyleSheetTheme.

Sponsored Links
SolarSystem - AngularJS Demo
SolarSystem - Angular JS Demo

Check out my first Angular JS demo hosted in Azure, it helped win my first Angular contract. Put the sound on.