Anyone point me to any article that describes how to use themes and skins in an asp.net mvc application?
Asked
Active
Viewed 9,419 times
5
-
I have used the sample code from this link, http://www.codeproject.com/KB/aspnet/ASPNETMVCDynamicThemes.aspx Everything works fine except "Html.RenderAction" methods. It throws this exception "A master name cannot be specified when the view is a ViewUserControl". If any of you aware of this error pls help. – Ravi Oct 31 '09 at 06:36
3 Answers
2
I would use different CSS files as George suggests. You can achieve an awful lot this way. See CSS Zen Garden for examples of just how much you can do.
If this doesn't give you enough control then you can also specify a master page in your controller like this:
return View(stringViewName, stringMasterName, model);

Richard Garside
- 87,839
- 11
- 80
- 93
1
For ASP.NET MVC, you don't have the ASP.NET 'Themes' mantra, you typically use CSS.

George Stocker
- 57,289
- 29
- 176
- 237
-
1I don't think he meant "Themes" as in controls, more like Wordpress themes and similar. You can't change the whole design just by the means of CSS. – Egor Pavlikhin Oct 31 '09 at 05:20
-
2@HeavyWave: I don't think you've used ASP.NET MVC. Actually, you can change the whole design using CSS. What would stop you from doing that? You aren't supposed to be using ASP.NET controls with MVC. – George Stocker Oct 31 '09 at 14:57
0
this guy uses a custom view engine to solve this problem, I like this solution better than ASP.MET MVC Dynamic Themes, however I didn't tested any of both, I'm still looking for something.

Eugenio Miró
- 2,398
- 2
- 28
- 38