title: How to change Asp.net Theme via Web.Config on the fly
body: <p><strong>Summary</strong></p>
  
  <p>I have a web-application with more than 5 themes. Each themes covers a completely different style for different customers. whenever we publish a new version of our application we send it for all of customers.</p>
  
  <p><strong>The problem.</strong></p>
  
  <p>We specify theme in web.config file in <code>&lt;Page&gt;</code> tag. like</p>
  
  <pre><code>&lt;page theme="Theme1" /&gt; // or Theme2 for second customer.
  </code></pre>
  
  <p>with this approach we easily change the style of application from each other without writing codes which needs a new publish for each one.</p>
  
  <p>With changing the <code>theme="Theme1"</code>. nothing change and we didn't write a code in application , so why changing <code>theme</code> don't change the theme and we need a new publish?</p>
  
  <p>we want to change it in <code>web.config</code> or somewhere else and with changing it the theme change without needing a new publish for each one.</p>
  
  <hr>
  
  <p><strong>Update :</strong></p>
  
  <p>I Publish Once and then copy the published version for each customer (5 times) then in each <code>web.config</code> file I change the <code>theme="CustomerTheme"</code>. but only the theme which was active in publish process is usable in all of 5 versions and other 4 themes are un-usable </p>
  
  <p>--</p>
  
  <p>Actually the main question is that why changes in Web.Config need a different publish while it is XML and do not need a complie. I should Add this note that, App_Theme include all of 5 themes so that all of them Compiles and are ready to use</p>
  
  <p>--</p>
  
  <p>This is the way I publish the application</p>
  
  <p><img src="https://i.stack.imgur.com/Ve024.png" alt="Publish"></p>
  
  <p><a href="http://hajloo.files.wordpress.com/2010/09/publish.png" rel="nofollow noreferrer">Photo Link</a></p>
  
  <hr>
  
  <p>Update 2</p>
  
  <p>here IFound the exact problem reported by someone else. he resolve the problem but I can't underestand how he resolved this Issue. can anybody tell me how he resolved the issue?</p>
  
  <p>he used <strong><code>aspnet_compiler command</code></strong> and told that <strong><code>automatically ADDS the 'theme' on the Page directive</code></strong></p>
  
  <p>(first post is the question and the last post is the answer)</p>
  
  <p><a href="http://bytes.com/topic/asp-net/answers/495850-themes-web-config" rel="nofollow noreferrer">http://bytes.com/topic/asp-net/answers/495850-themes-web-config</a></p>