Creating a MVC layout page
The last step in creating a Bootstrap 4 enabled ASP.NET MVC project is to create a master layout page that will reference the Bootstrap CSS and JavaScript files. To create the layout page, complete the following steps:
Add a new file called
_Layout.cshtml
to theViews\Shared
folder.Add the following HTML to the file:
<!DOCTYPE html> Â Â Â Â Â Â <html> Â Â Â Â Â Â <head> Â Â Â Â Â Â <meta charset="utf-8" /> Â Â Â Â Â Â <meta name="viewport" content="width=device-width, Â Â Â Â Â Â initial-scale=1.0" /> Â Â Â Â Â Â <title>My Bootstrap Site</title> Â Â Â Â Â Â <link rel="stylesheet" href="~/css/bootstrap.css" /> Â Â Â Â Â Â </head> Â Â Â Â Â Â <body> Â Â Â Â Â Â <div class="container body-content"> Â Â Â Â Â Â @RenderBody() Â Â Â Â Â Â <hr /> Â Â Â Â Â Â <footer> Â Â Â Â Â Â <p>...