473,468 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

define style sheet with data drom dbase

how can I have the stylesheet of my page defined from within my database.

now there is just this:
<link href="mystylesheet.css" type="text/css" rel="stylesheet" />

and I want this:
<link href="generated_from_the_database.css" type="text/css"
rel="stylesheet" />

My dbase connection etc is already done and I use datatable (not datareader)

THX !!
Nic.
Nov 18 '05 #1
2 1144
"nicholas" <mu********@hotmail.com> wrote in
news:#v**************@TK2MSFTNGP14.phx.gbl:
how can I have the stylesheet of my page defined from within my
database.

now there is just this:
<link href="mystylesheet.css" type="text/css" rel="stylesheet" />

and I want this:
<link href="generated_from_the_database.css" type="text/css"
rel="stylesheet" />

My dbase connection etc is already done and I use datatable (not
datareader)

Here are a couple of ideas:

-You can create a link to an ASPX page which outputs the CSS from the
database:

<link href="myoutputpage.aspx" type="text/css" rel="stylesheet" />

-You can include the CSS content on the current page with a literal -
just fill a literal control with the CSS from the DB.

For outputting CSS, a datareader is good enough... there's no real
advantage to using a datatable.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2
Found an easier way.

Just put this in the in the same event that load the data from the database:
response.write("<link rel=""stylesheet"" type=""text/css""
href=""/custom_css/" & CurrentRow("cssstylename") & ".css"" />")

....and it works.

THX !

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
"nicholas" <mu********@hotmail.com> wrote in
news:#v**************@TK2MSFTNGP14.phx.gbl:
how can I have the stylesheet of my page defined from within my
database.

now there is just this:
<link href="mystylesheet.css" type="text/css" rel="stylesheet" />

and I want this:
<link href="generated_from_the_database.css" type="text/css"
rel="stylesheet" />

My dbase connection etc is already done and I use datatable (not
datareader)

Here are a couple of ideas:

-You can create a link to an ASPX page which outputs the CSS from the
database:

<link href="myoutputpage.aspx" type="text/css" rel="stylesheet" />

-You can include the CSS content on the current page with a literal -
just fill a literal control with the CSS from the DB.

For outputting CSS, a datareader is good enough... there's no real
advantage to using a datatable.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #3

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

Similar topics

2
by: Mark | last post by:
Hi - I want to allow users of an intranet application, to select their own colours etc. So I have a tbale in my database, which has fields called bgcolour, fontcolour etc. As I want all pages...
2
by: Ivan | last post by:
Hi, SQL Server 2000 SP3 Windos 2000 Server SP4 I have a DTS package that imports data from a dBase IV databse with files located in two folders (dBF1 and dBF2). I use a transform data task...
1
by: blue | last post by:
My app draws a bunch of tables on the page and has a form for the user to enter data and submit. The form is contained within a User Control called DecisionCtl. When they submit the form, a bunch...
1
by: Amanda H. | last post by:
I posted about this a few days ago, and I got a few suggestions that fixed part of my problem. I am using a PHP script to switch external style sheets when the viewer clicks on the style link. ...
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...
8
by: pamelafluente | last post by:
Hi guys, Is it possible to add "onload" (via Javascript) a new class to the <styleheader section? If yes, how would that be done ? <style type="text/css" media="screen"> .NewStyleClass{...
10
by: pamelafluente | last post by:
Hi, this time I am trying to add a style on the fly.I wish equivalency with this one (only the menuItemStyle line): <head> <style type="text/css" media="screen"> ... some static styles ......
1
by: Looch | last post by:
Hi All, I have a need for a user to open an XML file from a web site and have it open based on a style sheet, not just looking at the raw XML data. I'm wondering what the best way to go about...
4
by: fjm | last post by:
Hello everyone. I’d like to know how to handle multiple style sheets. I have css tabs that have a style sheet and then I also have a separate style sheet for the content that goes inside the tab. ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
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...
0
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,...
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: 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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.