Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3933160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:34:11+00:00 2026-05-19T23:34:11+00:00

I have an App_Themes directory, and also Master pages for a ASP.NET website. Can

  • 0

I have an App_Themes directory, and also Master pages for a ASP.NET website.

Can I use 2 different themes based on the master page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T23:34:12+00:00Added an answer on May 19, 2026 at 11:34 pm

    MSDN has an article about ASP.NET Master Pages And Themes

    You cannot directly apply an ASP.NET
    theme to a master page. If you add a
    theme attribute to the @ Master
    directive, the page will raise an
    error when it runs.

    However, themes are applied to master
    pages under these circumstances:

    • If a theme is defined in the content
      page. Master pages are resolved in the
      context of content pages, so the
      content page’s theme is applied to the
      master page as well.

    • If the site as a whole is configured
      to use a theme by including a theme
      definition in the pages Element
      (ASP.NET Settings Schema) element.

    In addition to the above you can see the section about Themes and Skins. You can change theme programmatically

    Example from MSDN

    protected void Page_PreInit(object sender, EventArgs e)
    {
        switch (Request.QueryString["theme"])
        {
            case "Blue":
                Page.Theme = "BlueTheme";
                break;
            case "Pink":
                Page.Theme = "PinkTheme";
                break;
        }
    }
    

    But you cannot use two themes at the same time, that does not make any sense. You could however change the theme based on which masterpage is used.

    To answer your question in your comment, yes you can have different themes for different sub-folders. This is from MSDN:

    A theme setting in the Web.config file
    applies to all ASP.NET Web pages in
    that application. Theme settings in
    the Web.config file follow normal
    configuration hierarchy conventions.
    For example, to apply a theme to only
    a subset of pages, you can put the
    pages in a folder with their own
    Web.config file or create a
    element in the root Web.config file to
    specify a folder. For details, see
    Configuring Specific Files and
    Subdirectories.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.NET web application that uses Themes. Inside the theme directory are
I have in my C#, .NET 3.5 (VS2008) web project's App_Themes directory a theme
I have an ASP.NET application that uses themes. Let's pretend I have a theme
How do I change ASP.NET App_Themes based on what Skin is selected in RadSkinManager?
I'm building an Android app and I need to have two different themes for
I have an application where different users can log in via a single portal
Possible Duplicate: .Net Process.Start default directory? I have a C# application, mono to be
I have a folder inside my ASP.NET web application. I put all css files
I have an ASP.NET application with a ListView . I get data from Active
I'm using the jquery dialog in my ASP.net web app. Within it I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.