Hi Terry,
Inside the <head> tag, add a link tag that is set to run as a server-side
control. Give it an ID but not an href:
<link id="stlysht" rel="styleSheet" runat="server"></link>
In your code behind, declare the control (using the ID) as a generic
control. (Normally, VS.NET does it for you.)
Protected stlysht As _
System.Web.UI.HtmlControls.HtmlGenericControl
In your page load, add an href attribute and the place it should find the
stylesheet:
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
' Get the cookie preference here
' Use Ifs or Case statements as required
If 1 = 1 Then
stlysht.Attributes.Add _
("href", _
"
http://www.aspalliance.com/css/aspalliance.css")
End If
End Sub
Does this help?
Ken
MVP [ASP.NET]