Question: I have a webdev problem

I have close to 10,000 serverside pages, all of thse use the same stylesheet. I have created a new serverside page which is like a dynamic menu system to help find specific pages from the existing 10,000 pages quickly and easily.

The problem is, that if the serverside pages are accessed the old way using the old menu system, they should retain their old stylesheet. however, if they are accessed via the new menu system, they should use a new refreshed stylesheet.

Editing 10,000'ish pages does not seem like a good option. What is the best way to go about tackling this problem?

Answer: 
Have the stylesheet in an app\_themes folder and set this in the web.config. Then you can change between the two quickly. Or you could set this in code in the pre\_init event

EDIT:
1: Add and app\_themes folder, create two sub folders with theme names (eg, default or Blue etc)

2: either in the web.config set the or

3: catch the page\_init for each page that you wish to change(or for master pages and lots of pages have a base page class and override page\_init) and set the Page.Theme = to a theme you want. Best off saving this in Session State from what I can tell. So something like this:

```
 if (Session["Theme"] == null)
  {
    //the string is the theme as per the cleaners default
    string chosenTheme = selectedTheme();
    Session.Add("Theme", chosenTheme);
    Page.Theme = ((string)Session["Theme"]);
  }
  //if the page is reloaded.
  else
  {
    Page.Theme = ((string)Session["Theme"]);
  }

```

Hope this helps sire
If you can't write some global server side code nor have a global template for all the 10.000 pages, my first idea is to have a URL-Rewrite for the CSS file based on a specific url parameter. So you could have a 2nd CSS file which will be served if this parameter is submitted, if not the rewrite would serve the original css file.