Krishnaraj Barvathaya
Krishnaraj Barvathaya

Reputation: 595

How to load cascading style sheet into C# object?

I am developing a web application, where i want to give freedom of changing style elements of css linked to a page via an admin screen. So I am wondering is there any way I can load CSS file into a C# object or into XML passable formate and update it from the admin screen inputs? Thank you, Krishnaraj

Upvotes: 2

Views: 1912

Answers (3)

Krishnaraj Barvathaya
Krishnaraj Barvathaya

Reputation: 595

I found this interesting article about parsing CSS in CodeProject. I need to check how I can customize it to suite my requirement.

Upvotes: 1

C. Ross
C. Ross

Reputation: 31848

If you are using ASP.NET MVC, you can create new ActionResult type called CssResult that dynamically generates a CSS. An example of how to write a custom ActionResult can be found here.

Upvotes: 0

sashaeve
sashaeve

Reputation: 9617

You can create several themes and change them in the admin section. Also you can create different skins for your controls.

Links: ASP.NET Themes and Skins Overview, How to: Apply ASP.NET Themes

Upvotes: 0

Related Questions