Hello, 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
A:
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
sashaeve
2010-02-18 14:22:52
A:
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.
C. Ross
2010-02-18 14:32:16
I went though the link, but I am not sure whether I will be able to load css file into an c# object and fire XPATH over it. I must give freedom to user to choose style elements such as height, color, font, font style etc. I will provide a default style elements which user can customize himself. So I will be having a default css file, elements of which I want to populate over the web form and user can change the element values. When he clicks on Finish/Save, I want to save these new values in to the same CSS file. Any idea how can I achieve this??
Krishnaraj Barvathaya
2010-02-18 14:52:03
A:
I found this interesting article about parsing CSS in CodeProject. I need to check how I can customize it to suite my requirement.
Krishnaraj Barvathaya
2010-02-18 15:19:21