Looking to dynamically change the CSS file being used in my ASP.NET Web Application when it's running.
Imagine I have two CSS files, red.css
and blue.css
.
I attempted the following method:
In the Master Page, I have this link:
<link rel="Stylesheet" ID="Styles" runat="server"/>
In the Master Page's Page_Load event:
Styles.Href = Global.CSSPath;
In Global.asax:
public static string CSSPath = "red.css";
(assuming both are in the same folder)
This method works. Additionally, I could easily create functionality to change the value of CSSPath to switch to blue.css or any other theme. Now, I want to know if this change impacts only one user or all users of the web application.
If it only affects one user, that's fantastic, thank you! If it doesn't, what should I do to enable theme changes at runtime for a particular user/session?
Appreciate your insights,
Dennis