What is Razor?
Razor combines HTML and C# to generate pages. Razor syntax, Razor Pages and Blazor have different roles. We explain the differences before writing code.
First learn the basics in ASP.NET Core Foundations.
Available beginner lessons
Lesson 00
What is Razor?
Explanations, examples and practice →
Lesson 01Create a Razor Pages project
Explanations, examples and practice →
Lesson 02Variables, conditions and loops
Explanations, examples and practice →
Lesson 03PageModel and OnGet
Explanations, examples and practice →
Lesson 04Forms, binding and POST
Explanations, examples and practice →
Coming later
Layouts, partials, Tag Helpers, validation, dependency injection, database CRUD, authentication, security, testing, deployment, Razor components and Blazor.
Official references: Microsoft Razor Pages tutorial · Download .NET