ASP.NET MVC Bootstrap
Bootstrap is a popular web framework which is used to create responsive web application that can run even on the mobile device. It provides HTML, CSS and JavaScript libraries to build applications.
ASP.NET MVC, by default supports Bootstrap and use it’s libraries to create frontend of the application. Let?s create a MVC project and examine its libraries.
First create a project by selecting from the file menu.
Select the type of web project.
Select template for the web application. We are selecting MVC.
After clicking ok, it will create a project that has following structure.
The Script folder of the project includes the Bootstrap JavaScript libraries. Our project includes the following JavaScript files.
The Content folder contains Bootstrap CSS files. Our project contains the following files.
To see the uses of these CSS classes, click on the login link at top right corner of the web page. This will redirect to the login page that has a form to be filled. This form contains HTML components that are organized in a layout with the help of CSS classes.
Take a closer look at the source code of the Login.cshtml file. This file uses CSS classes like row, col-md-8 etc.
// Login.cshtml
If we look at the view source of the Login.cshtml page, it shows that the Bootstrap libraries are linked to the web page. The following two screenshots shows that.