Module 06 of 12

Razor Pages & MVC

Lessons

About This Module

Not every ASP.NET Core app is an API. When you want the server to render HTML, you have two closely related options: Razor Pages, which pairs each page with its own handler, and MVC, which separates models, views, and controllers. Both use the Razor syntax to mix C# into HTML, and both sit on the same routing, DI, and middleware you've already learned.

This module starts with Razor Pages, then moves to building an MVC application with controllers, actions, and views. It covers how layouts and partial views remove duplication, and finishes with forms and model validation using data annotations and tag helpers.

Watch the lessons in order, then continue on to Data Access with EF Core.

Lessons

4 videos
01

Get Started with Razor Pages in ASP.NET Core

The first tutorial in a series that teaches the basics of building an ASP.NET Core Razor Pages web app.

02

Create an ASP.NET Core MVC Application

Creates a first ASP.NET Core MVC web application in Visual Studio and shows how to create actions, views, and controllers.

03

Layouts and Partial Views in ASP.NET Core MVC

Explains how layouts give your pages a shared structure and how partial views let you reuse pieces of markup across views.

04

Validation in ASP.NET Core MVC

Covers common data attributes for validating a model, plus the asp-validation-for tag helper that displays a validation message for a specific property.