title: Enabling/Disabling CSS based on Session value using MVC
body: <p>I am rather new to MVC applications, and one thing I am trying to accomplish is enabling or disabling stylesheets based on a Session value.</p>
  
  <p>I have stylesheets referenced in my Site.Master page in this manner:</p>
  
  <p>&lt;%=Html.Stylesheet("~/styles/main.css", "string")%>
  &lt;%=Html.Stylesheet("~/styles/additions.css", "string")%></p>
  
  <p>Right now, for testing, I have been putting an if statement around the Html.Stylesheet tags saying:</p>
  
  <p>&lt;% if (Session["cssRule"] = "enableCss") { %></p>
  
  <p>&lt;%=Html.Stylesheet("~/styles/main.css", "screen")%>
  &lt;%=Html.Stylesheet("~/styles/additions.css", "screen")%></p>
  
  <p>&lt;%} %></p>
  
  <p>So if the 'cssRule' Session value is null, no CSS loads. Currently this is working fine, but it is not exactly what I am looking for. Right now I set the Session value in the Controller when the user logs in, but ultimately I need to set the value of the Session variable depending on if a user clicks the enable or disable button. Since I have been primarily using webforms for the past year and a half, I just want to drop a hyperlink and set an event for it, but alas, this is the future of MVC so I need to figure out how I can do something like this..</p>
  
  <p>So my real question is how can I set the Session of the "cssRule" value by clicking a link using MVC?</p>