How to: Disable ASP.NET Themes
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Disable ASP.NET Themes

You can configure a page or control to ignore themes. Themes override local settings for page and control appearance by default. Disabling this behavior is useful when a control or page already has a predefined look that you do not want the theme to override.


You can give precedence to control settings on the current page by applying a theme as a style sheet theme. In that case, the theme is used to set properties that have no local settings, but explicit local settings take precedence. For details, see How to: Apply ASP.NET Themes.

To disable themes for a page

  • Set the EnableTheming attribute of the @ Page directive to false, as in this example:

    <%@ Page EnableTheming="false" %>

To disable themes for a control

  • Set the EnableTheming property of the control to false, as in this example:

    <asp:Calendar id="Calendar1" runat="server" EnableTheming="false" />

See Also

© 2015 Microsoft