|
 |
asp_web_howto thread: Dynamic change to style sheets
Message #1 by "Rob Hill" <rob@t...> on Wed, 22 Aug 2001 09:12:13
|
|
I want to change style sheets according to a value held in the users table
which I've placed in a session variable. I've taken a look at Peter
Piotti's method, but the style sheets are quite complex, so before I go
diving into lots of coding, why won't this work -
<link rel="stylesheet" href=Session("sStyleSheet") type="text/css">
????
Have I missed something obvious, or will this simply not work
Thanks, rob@t...
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 22 Aug 2001 19:10:43 +1000
|
|
You need to tell the server which part is the ASP that needs to be
processed. Something like:
<link rel="stylesheet" href="<%=Session("sStyleSheet")%>" type="text/css">
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Rob Hill" <rob@t...>
Subject: [asp_web_howto] Dynamic change to style sheets
: I want to change style sheets according to a value held in the users table
: which I've placed in a session variable. I've taken a look at Peter
: Piotti's method, but the style sheets are quite complex, so before I go
: diving into lots of coding, why won't this work -
:
: <link rel="stylesheet" href=Session("sStyleSheet") type="text/css">
:
: ????
:
: Have I missed something obvious, or will this simply not work
Message #3 by <taodeny@y...> on Wed, 22 Aug 2001 12:06:53 +0300
|
|
Try using : <link rel="stylesheet" href="<%=Session("sStyleSheet")%>"
type="text/css">
T. Odeny
Message #4 by "Rob Hill" <rob@t...> on Wed, 22 Aug 2001 17:37:16
|
|
Thanks guys - I worked it out about 2 minutes after posting the message -
I'd tried <%....%> already with no joy - I had missed out the '=' sign!!!
Regards, rob@t...
Message #5 by Kyle Burns <kburns@c...> on Fri, 24 Aug 2001 15:42:48 -0500
|
|
You forgot <% and %>. Try to modify your code to read as follows:
<link rel="stylesheet" href="<% =Session("sStyleSheet") %>" type="text/css">
-----Original Message-----
From: Rob Hill [mailto:rob@t...]
Sent: Wednesday, August 22, 2001 4:12 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Dynamic change to style sheets
I want to change style sheets according to a value held in the users table
which I've placed in a session variable. I've taken a look at Peter
Piotti's method, but the style sheets are quite complex, so before I go
diving into lots of coding, why won't this work -
<link rel="stylesheet" href=Session("sStyleSheet") type="text/css">
????
Have I missed something obvious, or will this simply not work
Thanks, rob@t...
|
|
 |