Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Bootstrap for ASP.NET MVC - Second Edition

You're reading from  Bootstrap for ASP.NET MVC - Second Edition

Product type Book
Published in Sep 2016
Publisher
ISBN-13 9781785889479
Pages 186 pages
Edition 2nd Edition
Languages
Author (1):
Pieter van der Westhuizen Pieter van der Westhuizen
Profile icon Pieter van der Westhuizen

Table of Contents (15) Chapters

Bootstrap for ASP.NET MVC Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Getting Started with ASP.NET Core and Bootstrap 4 2. Using Bootstrap CSS and HTML Elements 3. Using Bootstrap Components 4. Using Bootstrap JavaScript Components 5. Creating MVC Bootstrap Helper and Tag Helpers 6. Converting a Bootstrap HTML Template into a Usable ASP.NET MVC Project 7. Using the jQuery DataTables Plugin with Bootstrap 4 8. Creating Bootstrap 4 ASP.NET MVC Sites Using Visual Studio Code Bootstrap Resources

Creating the master layout


You've added the CSS and JavaScript files needed to create the master layout file for your project. Next, you need to create a home controller as well as a master layout file. To do this, complete the following steps:

  1. Add a new empty controller called HomeController to the Controllers folder by right-clicking on it and selecting Add | New Item....

  2. Select MVC Controllers Class from the list of project items and click on the Add button.

  3. Next, right-click on the Views folder in your project and navigate to Add | New Folder. Name the folder Shared.

  4. Right-click on the newly created Shared folder and navigate to Add | New Item...

  5. Select MVC View Layout Page in the list of project items and keep the name of the file as _Layout.cshtml and click on Add.

  6. Open the index.html file in the Bootstrap 4 Admin Dashboard template source files and copy its contents to the _Layout.cshtml file.

  7. Change the <head> tag to reference the styles.css folder in the correct folder, as illustrated...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}