I have two primary themes, one dark, one light for the forum, however, with the background of the ASP.NET Site.Master not blending in with both I have decided to change the entire template predicated on what the forum theme the user chooses. So the light theme will have a light background for the site, and dark theme will have a dark background for the site. Pretty simple, right?

I have this in the Site.Master page ...

<link href='<%# HttpContext.Current.Session["theme"].ToString() %>' rel="stylesheet" type="text/css" />

... and that works for the Forum.aspx (renamed to Default.aspx) as desired, but when navigating to any other site link, the CSS template is lost.

What can I do to maintain the template the user selects from their forum profile throughout the entire site?

有帮助吗?

解决方案

I found the answer from this question. I had to remove runat="server" from the head tag.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top