Add HTML5 Boilerplate to MVC 3 (Razor) Project

Install the NuGet using Visual Studio Library Package Manager

Tools | Library Package Manager | Add Library Package Reference
Search for Html5 and install

After the files are added to the project, open the /Views/_ViewStart.cshtml
Change the Layout to the new _Html5Boilerplate.cshtml
@{
    Layout = "~/Views/Shared/_Html5Boilerplate.cshtml";
}

Add HTML5 Boilerplate to MVC 2 Project

Note: This will also work for MVC 3 (ASPX)

Install the NuGet using Visual Studio Library Package Manager

Tools | Library Package Manager | Add Library Package Reference
Search for Html5 and install

After the files are added to the project, you will need to point your content files to the new MasterPage (Html5Boilerplate.Master).

Edit | Find and Replace | Find in Files
Search for Site.Master, and click Find All

Change the MasterPageFile attribute in the Page declarative of the content page from Site.Master to Html5Boilerplate.Master
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Html5Boilerplate.Master" Inherits=" ... " %>

Add HTML5 Boilerplate to Web Form Project

Install the NuGet using Visual Studio Library Package Manager

Tools | Library Package Manager | Add Library Package Reference
Search for Html5 and install

After the files are added to the project, you will need to point your content files to the new MasterPage (Html5Boilerplate.Master).

Edit | Find and Replace | Find in Files
Search for Site.Master, and click Find All

Change the MasterPageFile attribute in the Page declarative of the content page from Site.Master to Html5Boilerplate.Master
<%@ Page Language="C#" MasterPageFile="~/Html5Boilerplate.Master" Inherits=" ... " %>

Last edited Mar 25, 2011 at 7:43 PM by jsalwen, version 4

Comments

No comments yet.