473,505 Members | 14,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing stylesheet

Hi, folks:

I am looking for a way to switch stylesheets for our webforms.
We want to have a default stylesheet and then allow the user to pick from a
list of pre-defined stylesheets.
The user's choice will be stored in the database in the user's profile and
all the pages/webforms must use the user's stylesheet selection.

TIA,
Val
Nov 17 '05 #1
2 1097
Just add a runat=attribute to the CSS tag in your HTML.
Here's an example that uses the title tag, but it should work the same way:
http://www.aspalliance.com/kenc/faq5.aspx

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Valerian John" <vj***@shentel.net> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl...
Hi, folks:

I am looking for a way to switch stylesheets for our webforms.
We want to have a default stylesheet and then allow the user to pick from a list of pre-defined stylesheets.
The user's choice will be stored in the database in the user's profile and
all the pages/webforms must use the user's stylesheet selection.

TIA,
Val

Nov 17 '05 #2
My solution was to create a custom server tag that will just dump the
selected style tag(s) so you don't have to repeat your code on each page
(but still have the option to not include it in pages that don't need it).
You could also put the code in your page's base class.

Jerry

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
Just add a runat=attribute to the CSS tag in your HTML.
Here's an example that uses the title tag, but it should work the same way: http://www.aspalliance.com/kenc/faq5.aspx

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Valerian John" <vj***@shentel.net> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl...
Hi, folks:

I am looking for a way to switch stylesheets for our webforms.
We want to have a default stylesheet and then allow the user to pick from
a
list of pre-defined stylesheets.
The user's choice will be stored in the database in the user's profile

and all the pages/webforms must use the user's stylesheet selection.

TIA,
Val


Nov 17 '05 #3

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

Similar topics

6
10326
by: Jeff Thies | last post by:
I have a number of elements of "some-class". I'd like to change the styles of some-class: from ..some-class{color: red; display: block} to
2
2851
by: wjbell | last post by:
I have a piece of javascript I need to modify. Right now it changes a stylesheet in the document between style.css and no_indent.css. These are in the head of my document: <link rel=stylesheet...
6
3141
by: Jacqueline | last post by:
Hi, I would like to be able to write some code in Javascript preferably (PHP is also all right) which allows the admin of a website to be able to change stylesheet attributes from a GUI browser...
7
6566
by: Frostillicus | last post by:
Hi, I've written some javascript to randomly choose a classical music composer's picture and sample audio and display it on my home page (http://marc.fearby.com/), and this works fine in Mozilla...
5
1956
by: Andrew Poulos | last post by:
If I have an external stylesheet that is @imported into my page and it has an element that looks like this: * html td { font-style: italic; } how can I use javascript to change the font...
5
1539
by: Andrew Poulos | last post by:
I'm trying to change a style in a stylesheet. The following code works in FF, MZ, and IE6 but IE 5 gives the error of "invalid procedure call or argument": var oStyleSheet =...
5
1442
by: T. Wong | last post by:
I want to have a single CSS style sheet control the look of my whole asp.net application but I need to set the values in this CSS from code in the start page as the CSS values will be stored in a...
3
5143
by: 2good2b | last post by:
Is there a way to change the background color dynamically, when the color is defined at a CSS stylesheet? (tried document.bgcolor and this.style.background-color) Thanks
8
1677
by: matturn | last post by:
Is it possible to change one of the CSS style attributes of say "ul li"? Not a class or id, but a subset of HTML elements. If so, how would this be done?
4
2308
by: programmerboy | last post by:
I have a calender control on my page. It is a popup control, meaning when I click on calender image then it opens up. But the problem is when I am changing the month, it becomes invisible due to...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7303
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
7367
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...
0
5613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
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 ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.