Read external stylesheet values

  • Thread starter Thread starter Billy Cousins
  • Start date Start date
B

Billy Cousins

Can anyone tell me how to programmatically read the values from a stylesheet
that is linked into my asp.net app? I can read styles that are declared in
the HTML code, but have not found a way to get to the external stylesheet.
For example, I want to read the font-size and font-family from a class in
the stylesheet.
 
You're best bet will be to load the entire css file into a string and parse
it for the class and then parse out the font-size and font-family.
 
Back
Top