Last active
July 1, 2017 10:38
-
-
Save bcnzer/4a0a92cf9449b4ed4dee5e5d1b4af0f9 to your computer and use it in GitHub Desktop.
Sample _Layout.cshtml with partial views and a section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>@ViewData["Title"]</title> | |
<meta name="description" content="Sample code"> | |
<meta name="author" content="Test code limited"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"> | |
<!-- Bunch of CSS styles --> | |
</head> | |
<body> | |
<div id="app-main"> | |
<div id="app-header" class="app-header"> | |
@Html.RenderPartialAsync("~/Views/Shared/_Header.cshtml") | |
</div> | |
<div id="app-content" class="app-content"> | |
<div id="app-drawer" class="drawerjs drawerjs-has-bottom-nav"> | |
@Html.Partial("~/Views/Shared/_Drawer.cshtml") | |
</div> | |
<div id="app-drawer-holder"> | |
<div class="app-content-inner"> | |
@Html.Partial("~/Views/Shared/_PageHeader.cshtml") | |
</div> | |
<div class="app-content-inner"> | |
@RenderBody() | |
</div> | |
</div> | |
</div> | |
<div id="app-footer" class="app-footer"> | |
@Html.Partial("~/Views/Shared/_Footer.cshtml") | |
</div> | |
</div> | |
<!-- Note the next two lines --> | |
@Html.Partial("~/Views/Shared/_Scripts.cshtml") | |
@RenderSection("scripts", false) | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment