AI Instructor Live Labs Included

Building Web Applications with ASP.NET Razor Pages

Master ASP.NET Razor Pages — from routing and forms through authentication, EF Core, AJAX, security, caching, and testing with hands-on labs in VS Code.

Intermediate
1d 14h 0m
32 Lessons
RAZOR
ASP.NET Razor Pages Developer Badge

View badge details

About This Course

Master server-side web development with ASP.NET Razor Pages. This comprehensive course covers everything from project structure and routing through forms, validation, EF Core with PostgreSQL, authentication, external API consumption, file uploads, AJAX interactivity, security hardening, caching, and testing. Build real-world web applications using the Page Model pattern with hands-on labs in a browser-based VS Code environment. The capstone project challenges you to build a complete product catalog web application.

Course Curriculum

32 Lessons
01
AI Lesson
AI Lesson

Introduction to Razor Pages & Project Structure

45m

Learn what Razor Pages are, how they differ from MVC, the Page Model pattern, and the anatomy of a Razor Pages project.

02
Lab Exercise
Lab Exercise

Introduction to Razor Pages - Lab Exercises

1h 25m 2 Exercises

Create your first Razor Pages project, explore the project structure, and build your first pages.

03
AI Lesson
AI Lesson

Routing, Pages & Handlers

45m

Master convention-based routing, @page directives, route parameters, handler methods, named handlers, and page navigation.

04
Lab Exercise
Lab Exercise

Routing & Handlers - Lab Exercises

1h 30m 2 Exercises

Build multi-page navigation with route parameters, named handlers, and redirects.

05
AI Lesson
AI Lesson

Forms, Model Binding & POST-Redirect-GET

45m

Learn HTML forms with Razor Pages, model binding with [BindProperty], anti-forgery tokens, and the PRG pattern.

06
Lab Exercise
Lab Exercise

Forms & Model Binding - Lab Exercises

1h 35m 2 Exercises

Build product create, edit, and delete forms with model binding and TempData messages.

07
AI Lesson
AI Lesson

Validation (Client & Server Side)

45m

Master data annotations, ModelState validation, inline error display, client-side jQuery validation, and custom validation.

08
Lab Exercise
Lab Exercise

Validation - Lab Exercises

1h 30m 2 Exercises

Add validation to product forms, display errors, and implement custom cross-field validation.

09
AI Lesson
AI Lesson

Layouts, Partial Views & View Components

45m

Learn _Layout.cshtml, @RenderBody, sections, _ViewImports, _ViewStart, partial views, and View Components for reusable UI.

10
Lab Exercise
Lab Exercise

Layouts & View Components - Lab Exercises

1h 35m 2 Exercises

Create a site layout, product card partial, category sidebar view component, and breadcrumb navigation.

11
AI Lesson
AI Lesson

Data Access with EF Core & PostgreSQL

50m

Integrate EF Core with Razor Pages — DbContext registration, entity models, migrations, and CRUD page patterns.

12
Lab Exercise
Lab Exercise

Data Access with EF Core - Lab Exercises

1h 45m 2 Exercises

Connect to PostgreSQL, create entities, run migrations, and build full CRUD pages for products.

13
AI Lesson
AI Lesson

Tag Helpers & Razor Syntax

45m

Master built-in tag helpers (asp-for, asp-items, asp-page, asp-route-*), select lists, environment tag helper, and custom tag helpers.

14
Lab Exercise
Lab Exercise

Tag Helpers & Razor Syntax - Lab Exercises

1h 35m 2 Exercises

Convert raw HTML to tag helpers, build select dropdowns, and create a custom price-display tag helper.

15
AI Lesson
AI Lesson

Dependency Injection, Configuration & Middleware

45m

Learn service registration, injecting into PageModels and views, appsettings.json, IConfiguration, and custom middleware.

16
Lab Exercise
Lab Exercise

DI, Configuration & Middleware - Lab Exercises

1h 35m 2 Exercises

Extract services with DI, configure app settings, add request logging middleware, and custom error pages.

17
AI Lesson
AI Lesson

Authentication & Authorization

50m

Implement cookie authentication, ASP.NET Identity, login/register flows, [Authorize], policies, and role-based access.

18
Lab Exercise
Lab Exercise

Authentication & Authorization - Lab Exercises

1h 40m 2 Exercises

Set up Identity, build login/register pages, protect pages with [Authorize], implement role-based access.

19
AI Lesson
AI Lesson

Consuming External APIs

45m

Use HttpClient and IHttpClientFactory to call REST APIs from Razor Pages, with typed clients, error handling, and retry policies.

20
Lab Exercise
Lab Exercise

Consuming External APIs - Lab Exercises

1h 35m 2 Exercises

Build typed HTTP clients, display external API data in pages, handle errors gracefully, and add retry logic.

21
AI Lesson
AI Lesson

File Uploads & Static File Management

45m

Handle file uploads with IFormFile, validate file size and type, store and serve files, and manage product images.

22
Lab Exercise
Lab Exercise

File Uploads & Static Files - Lab Exercises

1h 35m 2 Exercises

Build product image upload, validate files, store to disk, display in gallery, and handle multiple uploads.

23
AI Lesson
AI Lesson

AJAX, JavaScript Interop & Partial Updates

45m

Use Fetch API with Razor Page handlers, return JSON from handlers, anti-forgery with AJAX, and partial page updates.

24
Lab Exercise
Lab Exercise

AJAX & JavaScript Interop - Lab Exercises

1h 35m 2 Exercises

Add live product search, add-to-cart without reload, infinite scroll, and real-time stock checking.

25
AI Lesson
AI Lesson

Filters, Security & Error Handling

45m

Learn page filters, global exception handling, CSRF deep dive, XSS prevention, Content Security Policy, and custom error pages.

26
Lab Exercise
Lab Exercise

Filters & Security - Lab Exercises

1h 35m 2 Exercises

Implement page filters, global error handling, security headers, and custom 404/500 error pages.

27
AI Lesson
AI Lesson

Caching & Performance

45m

Master in-memory caching, response caching, output caching, EF Core query optimization, and static asset bundling.

28
Lab Exercise
Lab Exercise

Caching & Performance - Lab Exercises

1h 35m 2 Exercises

Add memory caching to product pages, configure response caching, optimize database queries, and measure performance.

29
AI Lesson
AI Lesson

Testing Razor Pages

45m

Unit test PageModels with mocked services, integration test with WebApplicationFactory, and test forms, validation, and auth flows.

30
Lab Exercise
Lab Exercise

Testing Razor Pages - Lab Exercises

1h 45m 2 Exercises

Write unit tests for PageModels, mock services, build integration tests with WebApplicationFactory, and test auth flows.

31
AI Lesson
AI Lesson

Capstone Briefing: BrightShelf Product Catalog

30m

Review all concepts and receive the capstone project brief — build BrightShelf's complete product catalog web application.

32
Lab Exercise
Lab Exercise

Capstone: BrightShelf Product Catalog

2h 15m 1 Exercises

Build a complete product catalog web application with CRUD, auth, search, file uploads, AJAX, caching, and tests.

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 16 Hands-on Lessons
  • Completion Badge
ASP.NET Razor Pages Developer Badge

Earn Your Badge

Complete all lessons to unlock the ASP.NET Razor Pages Developer achievement badge.

Skill Level Intermediate
Total Duration 1d 14h 0m
ASP.NET Razor Pages Developer Badge
Achievement Badge

ASP.NET Razor Pages Developer

Awarded for completing the Building Web Applications with ASP.NET Razor Pages course, demonstrating proficiency in Razor Pages, routing, forms, validation, EF Core, authentication, AJAX, security, caching, and testing.

Course Building Web Applications with ASP.NET Razor Pages
Criteria Complete all 32 lessons including the capstone project in the Building Web Applications with ASP.NET Razor Pages course.

Skills You'll Earn

ASP.NET Razor Pages C# Entity Framework Core PostgreSQL Authentication Authorization AJAX Tag Helpers Dependency Injection Middleware Caching xUnit Testing Web Security

Complete all lessons in this course to earn this badge