Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 7th, 2006, 02:14 PM
Authorized User
Join Date: May 2006
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default db-driven css styles?

sort of a weird question, but is there any easy way to pull information out of a db and use it as a page style (i.e. if background, font, and link colors were defined in a table, could they be pulled out and used based on the page being viewed)...
there doesn't seem to be any page.stylesheet or page.style or anything like that... and the code can't really be stuck right into a style tag in a control, since the style tag would need to go in the head tag and not in the body tag...

maybe there is some built-in dot net thing that I am missing here?

any help is appreciated!

  #2 (permalink)  
Old July 16th, 2006, 11:51 PM
Friend of Wrox
Join Date: Apr 2005
Location: Fort Walton Beach, FL, USA.
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts

Yes, there is a way. You need to look into cascading style sheets.
You can ask for one to be included in your project by right clicking on the
project folder and selecting stylesheet.
You will also have to put a <link> statement in the header section for each
page that connects to the style sheet for that page.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Database Driven Top Menu Bar with CSS Lucy CSS Cascading Style Sheets 1 March 30th, 2006 10:14 PM
shorting CSS styles crmpicco CSS Cascading Style Sheets 8 February 20th, 2006 12:22 PM
Styles.CSS in ASP.NET rajen CSS Cascading Style Sheets 2 July 22nd, 2005 04:54 PM
Css styles in mx Adam H-W Dreamweaver (all versions) 4 December 19th, 2003 01:25 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.