ASP stylesheet setting
How can I choose one of multiple stylesheets using ASP? Heres my ASP at the moment:
<% T=Request.Cookies("THEME") %>
It's 开发者_StackOverflowin the head, there are two themes. I just need somone to show me how to do a conditional operator and if it's 1 then set a stylesheet. I could complete it from there
Thanks :)
VB Script Syntax
<%
IF (T = "MyTheme") THEN
%>
///HTML Or Style Sheet Tag Here
<%
ELSE
%>
///HTML OR Style Sheet Tag Here
<%
END IF
%>
<head>
<%
theme = request.cookies("theme")
styleSheet = "<link rel=""stylesheet"" type=""text/css"" href="""
if theme = "theme1" then
styleSheet = styleSheet & "css/theme1.css"
else
styleSheet = styleSheet & "css/theme2.css"
end if
styleSheet = styleSheet & """ />"
response.write(styleSheet)
%>
</head>
精彩评论