define style sheet with data drom dbase

N

nicholas

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.
 
L

Lucas Tam

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.
 
N

nicholas

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 !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top