ASP.NET MVC loading of CSS based off of controller

Posted by Scott on Stack Overflow See other posts from Stack Overflow or by Scott
Published on 2010-03-19T18:18:54Z Indexed on 2010/03/19 18:21 UTC
Read the original article Hit count: 176

Filed under:

Within my site I have controller specific CSS files in addition to my master css file. For example

CSS/
    Prodcuts/
             product.css
             ...
    Blog/
        blog.css
        ...
    masterStyle.css

Where masterStyle.css is the master css file. What I want to do is when the user hits http://www.example.com/Products/ only mySite.css and all css files under Products get included. What is the best way to go about doing this?

© Stack Overflow or respective owner

Related posts about asp.net-mvc