Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning ASP.NET Core 2.0

You're reading from   Learning ASP.NET Core 2.0 Build modern web apps with ASP.NET Core 2.0, MVC, and EF Core 2

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781788476638
Length 516 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Michel Bruchet Michel Bruchet
Author Profile Icon Michel Bruchet
Michel Bruchet
Jason De Oliveira Jason De Oliveira
Author Profile Icon Jason De Oliveira
Jason De Oliveira
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. What is ASP.NET Core 2.0? FREE CHAPTER 2. Setting Up the Environment 3. Creating a Continuous Integration Pipeline in VSTS 4. Basic Concepts of ASP.NET Core 2.0 - Part 1 5. Basic Concepts of ASP.NET Core 2.0 - Part 2 6. Creating MVC Applications 7. Creating Web API Applications 8. Accessing Data using Entity Framework Core 2 9. Securing ASP.NET Core 2.0 Applications 10. Hosting and Deploying ASP.NET Core 2.0 Applications 11. Managing and Supervising ASP.NET Core 2.0 Applications

Creating dedicated layouts for multiple devices


Modern web applications use web page layouts to provide a consistent and coherent style. It is best practice to use HTML in combination with CSS to define this layout. In ASP.NET Core 2.0, the common web page layout definition is centralized in a layout page. This page includes all the common user interface elements, such as the header, the menu, the sidebar, and the footer.

Furthermore, common CSS and JavaScript files are referenced in the layout page, so that they can be used throughout your whole application. This allows you to reduce code in your views, thus helping you to apply the DRY (Don't Repeat Yourself) principle.

We have been using a layout page since the very early versions of the Tic-Tac-Toe sample application. It was first introduced when we added it in a previous chapter. We have used it since to give our application a modern look, as you can see here:

Let's look at the layout page in more detail, to understand what it is and how...

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 $19.99/month. Cancel anytime