asp.net-mvc feature - one css file per (view / master-page / user-control)
- by Mendy
I'm trying to implement the following feature:
I want just one css file to be attached for any page that I rendered. For example take StackOverflow site. For the questions page, we will have questions.css file.
so.com/questions ---> questions.css
so.com/question/1234/title ---> question.css
so.com/about ---> about.css
so.com/faq ---> faq.css
Now, I know that this css files share code in common, because they may have the same MasterPage(s) / UserControls. So, the solution need to take into account MasterPages, views and usercontrols as well.
So, what will be the right solution for this kind of problem?
I'm thinking about one solution, I'll put is as an answer, but maybe you have a better solution for this?