Jeronimo Bertran wrote:
I want to be able to programatically read the value from a css stylesheet.
For example, I have a stylesheet with the following style defined:
.dayInactive
{
background-color:#D200D2;
}
And from a C# codebehind I want to be able to obtain the value for the
background-color.
Thanks
Jeronimo Bertran
There is nothing built in to do this on the server side. To positively
determine the style applied to any given element is rather complicated,
including parsing the page to determine what css files are loaded, load
them and parse them all, and parse the page content to be able to
determine what styles affect the element.
If you just have a simple style like your example, and only want to read
the property from a given css file based on a single class name, you can
just read the file, look for style and extract the property.
--
Göran Andersson
_____
http://www.guffa.com