Introduction

This article walks you through the steps for creating an ASP.NET Core Web Application using Bootstrap as a template for layout and changing it to a new one.

STEP 1 - Create ASP.NET Web Application

STEP 2 - Upgrade version if necessary

You can verify the version of bootstrap in two ways. First, by accessing the files in the lib\bootstrap\dist\css folder. If we open, for example, the file Bootstrap.css, we can check that the version of bootstrap is 3.3.6.

Another way to verify the bootstrap version is to check the installed Bower package.

As you see, the version is 3.3.6.

ASP.NET Core

STEP 3 - Change Layout

The default bootstrap template used in Visual Studio 2015 is Jumbotron. Jumbotron’s original source code is available here in the bootstrap website.

In this sample, we will change this template to a free bootstrap template Creative that could be download here.

To make that change, we need to:

Now, open the layout file _Layout.cshtml in the Shared folder under Views, and copy the content from index.html to layout.cshtml according to your layout.

This is the sample created with the solution.

ASP.NET Core

This is the sample after we made our changes.

ASP.NET Core