ASP.Net and Database CSS

B

Big E

I'm using ASP.net and SQL Server. In SQL Server I have a table that has
different Cascading Style Sheets. I want to lookup in that table the
particular CSS for the different pages.
Is there a way in the server side vb code to set a cascading style sheet. If
not, how can I get the database value into the cascading style sheet code.

Thanks.

Erik
 
R

Rutger Smit

Big said:
I'm using ASP.net and SQL Server. In SQL Server I have a table that has
different Cascading Style Sheets. I want to lookup in that table the
particular CSS for the different pages.
Is there a way in the server side vb code to set a cascading style sheet. If
not, how can I get the database value into the cascading style sheet code.

Thanks.

Erik

You can:

1) use <LINK href="stylesheet.aspx?page=x type="text/css"
rel="stylesheet"> and in stylesheet set the Response.ContentType to
"text/css"

2) Do a call in every page and put the database content in a Literal
Control.

3 Some other ways that all word like number 2


I strongly prefer method 1, very useful when using some smart cache
methods (in Page directive or the Cache object).


//Rutger
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top