Albert
Albert

Reputation: 3689

How to use a Session Variable value as the value of a property in an ASP tag (eg: background color)

I want to set the value of a session variable to a hex color code in the Global.asax, then use the value of that session variable (hex code) as the background color in the default.css file.

Can anyone give me an idea on how to accomplish this?

Upvotes: 2

Views: 324

Answers (2)

Payton Byrd
Payton Byrd

Reputation: 986

Another option would be to use themes which would allow you to have conditional color schemes by changing the them on the fly.

Upvotes: 1

Gabriel McAdams
Gabriel McAdams

Reputation: 58301

If you want to edit the css file, you would have to generate it (using an ashx file is one option).

Upvotes: 3

Related Questions