How to set up a CSS switcher

In Asp.net 3.5, you should be able to set up the Link tag in the header as a server tag. Then in the codebehind you can set the href property for the link element, based on a cookie value, querystring, date, etc.

In your aspx file:

<head>
  <link id="linkStyles" rel="stylesheet" type="text/css" runat="server" />
</head>

And in the Code behind:

protected void Page_Load(object sender, EventArgs e) {
  string stylesheetAddress = // logic to determine stylesheet
  linkStyles.Href = stylesheetAddress;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)