473,471 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cascading Style Sheets

I'm trying to give users a choice of the visual interface used in my ASP.NET
application using Cascading Style Sheets.

Ideally I'd like to offer them several choices for backgrounds, fonts, etc.
for the screens and controls and let them make a choice. Once they choose,
all screens and controls will display using the guidelines from the style
sheet selected.

I've figured out how to add a class to the style sheet for the different
server controls and even how to apply it in the html document using a "Link"
statement in the <HEAD> section of the document.

What I haven't figured out is how to make that dynamic.

The goal would be to store their style-sheet preference in a SQL Server
table and then refer to this each time a webpage is loaded to render it with
the style selected.

I just can't seem to find a way to output the "link" statement to the
document with a reference to the required style sheet.

Does anyone have a clue of what I'm talking about and how to fix it?

Thanks for your help... Herb

Nov 18 '05 #1
2 2032
you can "cheat", and do it like you would do in asp.
<link rel="stylesheet" type="text/css" href="<%=getCSS%>">

Then in code you just have a

Public Function getCSS as string
return "path/to/my/css/file.css"
End Function

If anyone else has a better way I sure would like to know.
--Michael

"Herb Stull" <st*****@nauticom.net> wrote in message
news:40**********@news.nauticom.net...
I'm trying to give users a choice of the visual interface used in my ASP.NET application using Cascading Style Sheets.

Ideally I'd like to offer them several choices for backgrounds, fonts, etc. for the screens and controls and let them make a choice. Once they choose,
all screens and controls will display using the guidelines from the style
sheet selected.

I've figured out how to add a class to the style sheet for the different
server controls and even how to apply it in the html document using a "Link" statement in the <HEAD> section of the document.

What I haven't figured out is how to make that dynamic.

The goal would be to store their style-sheet preference in a SQL Server
table and then refer to this each time a webpage is loaded to render it with the style selected.

I just can't seem to find a way to output the "link" statement to the
document with a reference to the required style sheet.

Does anyone have a clue of what I'm talking about and how to fix it?

Thanks for your help... Herb

Nov 18 '05 #2
Hey Mike,

Your suggestion worked very nicely!

Cheating or not, that's what I'm going to use in my app.

Thanks again, Herb

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: Axel Dahmen | last post by:
I try to combine properties of several classes. This is done by assigning a space separated list of class definitions to an element. However, IE shows a kind of preference when choosing the right...
2
by: pp | last post by:
What would you say about a smart script that would transform really 'cascading' style sheet into appropriate CSS structures. When coding css by hand, most often you are forced to write the...
5
by: JezB | last post by:
Is it possible to programatically examine and modify a page's Styles (including Cascading Style Sheets) within the code-behind-module (eg. c#) ? My guess is that since these are HTML elements the...
1
by: Jim Heavey | last post by:
Hello, I am hoping I have a very basic question for Cascading Style Sheets If I am using an ASp:Panel control and I have a number of controls in the panel, how do I get the controls to all...
1
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several users have had problems with the layout of the...
5
by: Peter Walburn | last post by:
Hi, I am writing a web based application in VB.Net. A lot of the forms in the applicaiotn have grids (datagrids) in them. I would like to have a style sheet which defines how the headers are...
4
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several users have had problems with the layout of the...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
5
by: MarkW | last post by:
I hope this is the correct place to post this: I am developing a web site for a e-commerce business I will be running. The site I'm setting up will be 50% store, 50% content. I'm not sure which...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.