In managing the styles for a series of pages, I have developed a common utility method. My goal is to determine if a CSS class exists in the .css file and then apply it, otherwise default to a standard style.
For example, both PageA.aspx and PageB.aspx use a styles.css file that contains a .default{...} class. To change the styling on PageA.aspx, I simply add another entry in styles.css like .PageA{....}. During runtime, the system will search for a css class named PageB - if not found, it will default to using the default class.
My question is: how can I programmatically check the .css file to see if a specific css class exists from the code-behind?
Thank you.