How do I turn off theme if I specified default theme in web.config?

Last post 09-25-2008 4:16 AM by mbischoff. 4 replies.

Sort Posts:

  • How do I turn off theme if I specified default theme in web.config?

    06-19-2004, 9:36 PM
    • Member
      85 point Member
    • gamania
    • Member since 06-18-2004, 12:06 AM
    • Posts 17
    In my web.config, I used <pages theme="Default"></pages> to specify default theme, however, I would like to turn it off in some special page, can I do that?
  • Re: How do I turn off theme if I specified default theme in web.config?

    06-20-2004, 3:26 AM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 5:03 AM
    • Sweden
    • Posts 5,334
    • TrustedFriends-MVPs
    To disable a theme for a page you can set the EnableTheming to false in the page directive:

    <%@ Page EnableTheming=False .... %>
    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
  • Re: How do I turn off theme if I specified default theme in web.config?

    06-26-2004, 7:44 PM
    • Participant
      1,140 point Participant
    • tinghaoy
    • Member since 06-11-2002, 2:29 PM
    • Beijing, China
    • Posts 228
    • AspNetTeam
    Please also note that this approach currently does not work for StyleSheetTheme, the EnableTheming attribute is simply ignored.

    To disable a stylesheet theme, apply <%@ Theme="" %> in your page directive to override the application-wide config setting.

    HTH,
    Ting-hao

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: How do I turn off theme if I specified default theme in web.config?

    09-23-2008, 12:02 PM
    Hi, you need to put blank in the attribute Theme in the pages tag: <pages theme=""> </pages> Hope it helps everyone!!
  • Re: How do I turn off theme if I specified default theme in web.config?

    09-25-2008, 4:16 AM
    • Participant
      852 point Participant
    • mbischoff
    • Member since 09-06-2005, 5:14 AM
    • Posts 127

    The easiest way I found is to override the Theme property on the pages where you want to disable theming:

      

    public override string Theme
    {
    	get { return ""; }
    	set { ; }
    }
    
     

     

    Please mark this post as Answer if it was helpful.

    -- Martin
Page 1 of 1 (5 items)
Microsoft Communities