Digital Colony!

EnableTheming Propery Ignored - The Bug and the Fix

ASP.NET 2.0 gave developers a server-based styling technology called Themes. From the web.config file a single line can dictate how an entire web site will look. The theme of this site at this writing is called Joshua.
<system.web>
 <pages theme="Joshua"/>
</system.web>
Microsoft tells us that is we want to turn off theming for a given page and not the entire site, we can set the EnableTheming property to false. But this doesn't work. The web.config setting will override the Page directive.
<%@ Page Language="C#" EnableTheming="false" %>
To get around this bug for a single page, specify a Theme with no value in the Page directive.
<%@ Page Language="C#" Theme="" %>

Labels: , ,

posted by MAS on Jun 7,2007

Legacy Comments

Digital Colony Copyright © 1999-2010 XHTML   508
Try...Catch Disclaimer: For brevity many examples do not include error handling. That is your responsibility.