ASP.NET 4 @Page EnableTheming

Hey there!

Today I was going over my “Themes and Skins” chapter in my ASP.NET 4 book and I noticed the following “bug”:


  • One *.aspx page
  • One theme (be it SmokeAndGlass, /care)

Modify the web.config like this:


This enables the “SmokeAndGlass” theme for all your *.aspx pages in the current application.
Next, open up the *.aspx page and modify the page directive:

<%@ Page Language="C#" 
EnableTheming="false" %>

Run the page and notice how the theme is still applied to the page, altho EnableTheming is set to false.
Either I’m doing something wrong but I seriously doubt that since I’m following the instructions in the book…

Any thoughts / ideas?

* EDIT: The EnableTheming attribute on ASP.NET controls does work.
* EDIT 2: Following link takes you to the MSDN page on how to disable themes. Mind the “Community Content” comment:
* EDIT 3:

Text snippet from my ASP.NET book

Leave a Reply

Your email address will not be published. Required fields are marked *