little-aspnetcore-todo
little-aspnetcore-todo copied to clipboard
Layout file from VS 2019 project does not match the book
On page 43, we are told to update the layout file by adding a line in a ul element. In my project, which was built in Visual Studio 2019, the shared layout file does not match what is in the book. I do not know where to put the added li element. _Layout.cshtml.txt
The <ul>
element has a different class now. There's only one block of code for a list in that file and it looks like this:
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</li>
</ul>
Add this piece of code below the <li>
for Privacy:
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Todo" asp-action="Index">My to-dos</a>
</li>