How to use Free CSS Templates with ASP.NET MVC 3
Tuesday, August 17, 2010 12:21 PM
Update for MVC 3 RTM
MVC 3 RTM does not support layout files in the Content folder. Consequently the best approach is to rename the index.html to _earthlingtwo.cshtml in the video instructions below and place it in the Views/Shared folder.
Additionally now you may just want to point to the new layout in _ViewStart.cshtml flie and avoid setting the layout on each View.
ASP.NET MVC has always made rendering an UI very simple. Starting with MVC 2 you can use master pages to define the layout of your pages consistently. MVC 3 takes this a step further with Razor View Engine and really makes beautifying your website very simple.
The inherent abstraction of the presentation layer made possible by the MVC framework, really helps in isolating the presentation (UI) from the logic. CSS templates are normally designed from the presentation perspective and using them with classic ASP.NET (also known as ASP.NET web forms) used to be very tricky. The contentPlaceHolders provide a very easy way to use CSS templates with MVC.
There are many websites which offer CSS templates for free. Most developers are not designers and so would like to make use of these freely available resources to their advantage. The following video demonstrates how to accomplish this: