Master Page and Themes.....

Last post 07-27-2005 6:40 PM by SimonCal. 2 replies.

Sort Posts:

  • Master Page and Themes.....

    07-21-2005, 10:18 PM
    • Member
      90 point Member
    • jmhinnen
    • Member since 06-29-2003, 10:32 PM
    • Posts 18
    Well, currently in ASP.NET 1.1, I am developing an application that basically can have multiple Master Pages, multiple Themes per master page.  How I define it is a Visual Style has multiple color themes with it.  This allows me to do a design that has a drop down menu instead of left menu.  To me it just seems weird that the Master is seperate from the theme in 2.0.  To me, the Master Page is part of the theme, it defines the actual layout of the Application. 

    What I would like to do is define a set of themes for a particular master page.  Can you override where ASP.NET is looking for the themes?  I know it is a special folder, but was wondering if you can some how capture that in an HttpModule or some other method.

    I could programmatically only let the User select certain Themes per Master Page, then when I set the Theme for the current user, it just works.  Just won't be as elegant as the way ASP 2 has it layed out.  Just wondering if they put in any hooks to let you extend the way themes work.
  • Re: Master Page and Themes.....

    07-25-2005, 6:15 PM
    • Contributor
      3,349 point Contributor
    • wyx2000
    • Member since 11-25-2002, 11:43 AM
    • Posts 812
    I bet you can achieve what you want to write you own virtualfileprovider and handle the request to theme files.
  • Re: Master Page and Themes.....

    07-27-2005, 6:40 PM
    • Participant
      1,910 point Participant
    • SimonCal
    • Member since 06-10-2002, 4:43 PM
    • Posts 381
    • AspNetTeam
      Moderator
    If you want to programmatically handle the theme then you could do that easily in a page base class that your content pages extend of course, this logic could also select a particular master-page too, as long as you retain contentplaceholder ids etc.

    You should be able to virtualize the themes through VPP I think, as these are treated as web content and not top-level folders/assemblies during compilation. Note that you'd have to handle the virtualpath for the theme and manage creation of the has/cachedependency etc.
    Simon
    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (3 items)