Export (0) Print
Expand All

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.

NoteNote

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

Community Additions

ADD
Show:
© 2014 Microsoft