Skip to Main Content
Advanced TypeScript Programming Projects
book

Advanced TypeScript Programming Projects

by Peter O'Hanlon
July 2019
Intermediate to advanced content levelIntermediate to advanced
416 pages
10h 6m
English
Packt Publishing
Content preview from Advanced TypeScript Programming Projects

Adding the Index view

At the top of the file, we set the ViewData to Title. We saw what this did back when we looked at _Layout.cshtml, but it's worth repeating that the value that we set here is used to help build the title in our master layout page. When we run our application, this sets the title to Home Page - AdvancedTypeScript 3 - Discogs:

@{  ViewData["Title"] = "Home Page";}

The user interacts with our application through a search control. It's time for us to add it in. We are going to add a div ID, which we will call pageRoot, that will contain a form element:

<div id="pageRoot">  <form asp-controller="Home" asp-action="Index" class="form-inline">  </form></div>

Again, we can see that we are using the full power of ASP.NET to our advantage ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn TypeScript 3 by Building Web Applications

Learn TypeScript 3 by Building Web Applications

Sebastien Dubois, Alexis Georges

Publisher Resources

ISBN: 9781789133042Supplemental Content