Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Francisca Perez   on Jun 03 In Asp.net Category.

  
Question Answered By: Phoebe Brown   on Jun 03

First, why are you doing this with a User Control?
It would be much easier to access the StyleSheet
you wanted  to use from a database. Let's say you
had a list of StyleSheets in a database table and
you wanted to change the style  you used on your
site every week.

You could place a LiteralControl in the Head section
of your aspx file  and set it's text in the codebehind
file:
Literal1.Text = "<link rel='stylesheet' type='text/css'
href='styles.css'></link>";

This information could be dynamically provided
from either a database or and XML file. You could
have a form which allowed you to change the
StyleSheet you wanted to use when your page  loaded.

Share: 

 
 
Didn't find what you were looking for? Find more on linking cascading style sheet Or get search suggestion and latest updates.


Tagged: