Building the Layout

The layout for this application is simple enough; we are going to have to create a child action to generate the footer, since it relies on data aggregated from the repository. To being with, though, we can define the styles and static content.

Creating the CSS styles

I have created a new style sheet called Triathlon.css in the Content folder. These are the same styles that I used in the previous builds of this application. I am not going to list them here because CSS is verbose, and you can get the styles from the source code download that accompanies this book. I have referenced the new style sheet in the _Layout.cshtml file, as shown in Listing 31-14. This file is in the Views/Shared project folder and is the view I will ...

Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.