Web Development · WDC-01-06

Basic ASP.NET Core with Razor Pages and Blazor

Basic ASP.NET Core with Razor Pages and Blazor is a foundation course in building web applications with ASP.NET Core 10 on .NET 10, covering Razor Pages, forms, data access with EF Core, user accounts and component-based UI with Blazor, the modern successors to Web Forms. It suits beginners who know some C#, developers maintaining Web Forms systems and students building .NET projects.

Updated
From 5,850 THB / person 6,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

ASP.NET 4.0 and Web Forms were once the main way to build business web applications on the Microsoft platform, but Web Forms is no longer being developed and is not part of modern .NET. Today, web applications on .NET are built with ASP.NET Core, which runs on Windows, Linux and Docker, performs better, and offers two ways of building pages that feel familiar to Web Forms developers: Razor Pages, where each page has its own code, and Blazor, which builds the interface from components that handle events in C#.

This course lays the foundations of building web applications with ASP.NET Core 10 on .NET 10. Learners install the tools, understand HTTP, Program.cs and middleware, build pages with Razor Pages, handle forms with validation and connect to a database with EF Core 10. They then work with state, dependency injection, logging and error handling, before building component-based UI with a Blazor Web App, adding user accounts with ASP.NET Core Identity and deploying the application. The course closes with an end-to-end web application workshop. (3 days, 6 hours per day, 18 hours in total, Beginner level.)

What you’ll gain

  • Understand how ASP.NET Core 10 is structured and how it differs from ASP.NET 4.x and Web Forms
  • Install and use the .NET 10 SDK, the dotnet CLI and the development tools with confidence
  • Build pages with Razor Pages, page models, layouts and tag helpers
  • Accept form input, validate it and guard against common attacks
  • Connect to a database with EF Core 10 and build CRUD pages with search and paging
  • Handle state, configuration, dependency injection, logging and errors the right way
  • Build component-based UI with a Blazor Web App and choose the right render mode
  • Add user accounts with ASP.NET Core Identity and deploy a web application

Who this course is for

  • Beginners who want to build web applications with ASP.NET Core and C#
  • Developers maintaining ASP.NET Web Forms systems who want to move to current .NET
  • IT managers and IT teams planning to modernise older web applications
  • Students building web application projects on the .NET platform

Prerequisites

  • Basic HTML and CSS
  • Basic C# programming such as variables, conditions, loops and classes; if you come from VB.NET, review C# syntax first
  • An understanding of databases and basic SQL
  • A laptop that can run the .NET 10 SDK and Visual Studio 2026 or VS Code, with permission to install software

Curriculum

Course Details

This course is a 2026 edition that replaces the previous Basic ASP.NET 4.0 course, which taught Web Forms on .NET Framework. It has been rewritten from scratch for ASP.NET Core 10 on .NET 10 (LTS). It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures with labs built on a single sample online store that grows throughout the course. Beginner level. Razor Pages replaces

.aspx pages, Blazor replaces the server control model, EF Core 10 replaces data source controls, and all code is in C#. The course focuses on page-based and component-based fundamentals for beginners and for developers moving from Web Forms; those who want to go deeper into MVC and Web APIs can continue with the ASP.NET Core MVC with .NET 10 course. Learners take home a lab guide and sample code for every lab.

Day 1 ASP.NET Core and Razor Pages Fundamentals

Section 1: Lab: Getting Started with .NET 10 and ASP.NET Core

  • From ASP.NET 4.x and Web Forms to ASP.NET Core: what changed and why
  • .NET 10 as an LTS release and its support period, and the UI options Razor Pages, MVC and Blazor
  • Install the .NET 10 SDK and Visual Studio 2026, or VS Code with C# Dev Kit
  • Create a project with dotnet new webapp and explore the folder structure
  • Lab: run your first app on Kestrel and edit pages with Hot Reload

Section 2: HTTP, Program.cs and Middleware

  • Requests and responses, HTTP methods, status codes and headers
  • Program.cs with minimal hosting in place of Global.asax and Web.config
  • The middleware pipeline: static files, routing, authentication and error pages
  • Reading HttpContext, query strings and route values
  • Lab: write middleware that logs the response time of every request

Section 3: Lab: Building Pages with Razor Pages

  • .cshtml files with a page model compared with .aspx files with code-behind
  • Handler methods: OnGet, OnPost and named handlers
  • Razor syntax: expressions, conditions, loops and automatic HTML encoding
  • Folder-based routing and route parameters in @page
  • Lab: build a product list page and a product details page

Section 4: Layouts, Partials and Tag Helpers

  • Layout pages and sections in place of the old master pages
  • _ViewStart, _ViewImports and partial views for reusable parts
  • Tag helpers for links, forms and static files
  • View components for parts with their own data, such as a menu or a shopping cart
  • Lab: build a site layout with a shared menu and footer on every page

Section 5: Lab: Forms, Model Binding and Validation

  • BindProperty and model binding from forms, query strings and routes
  • Data annotations: Required, StringLength, Range and EmailAddress
  • Checking ModelState on the server, plus client-side validation
  • Preventing CSRF with antiforgery tokens and the Post-Redirect-Get pattern
  • Lab: a sign-up form with error messages in Thai
Day 2 Data, State and a Maintainable App Structure

Section 6: Connecting to a Database with EF Core 10

  • EF Core in place of the old SqlDataSource, EntityDataSource and LinqDataSource
  • Create models and a DbContext with Code First
  • Connection strings in appsettings.json and registering the DbContext
  • Create and update the database with migrations
  • Lab: build a product and category database on SQLite

Section 7: Lab: CRUD Pages, Search and Paging

  • Scaffold Create, Read, Update and Delete pages from a model
  • Async LINQ queries and loading related data
  • Search, sort and page through data in place of GridView and DataPager
  • Handle concurrency when several users edit the same record
  • Lab: a product management page with search by name and category

Section 8: Managing State in a Web App

  • Why ASP.NET Core has no ViewState or Application State
  • Session state, cookies and TempData, and their caveats
  • Shared data through caching and services instead of application-level variables
  • Cookie security: HttpOnly, Secure and SameSite
  • Lab: a shopping cart in session and status messages with TempData

Section 9: Dependency Injection and Configuration

  • Built-in dependency injection and service lifetimes: singleton, scoped and transient
  • Move business logic out of the page model into service classes
  • appsettings.json, environments and the options pattern
  • Keep secrets in user secrets and environment variables rather than in code
  • Lab: move the pricing logic into a testable service

Section 10: Lab: Debugging, Logging and Error Handling

  • Debug with breakpoints and Hot Reload in Visual Studio or VS Code
  • Built-in logging with ILogger and setting log levels
  • The developer exception page, a user-facing error page and 404 pages
  • Health checks to monitor the app in place of the old tracing
  • Lab: track down a bug from the logs and fix it with a friendly error page
Day 3 Blazor, User Accounts and Going Live

Section 11: Lab: Getting Started with a Blazor Web App

  • Razor components, parameters and event handling compared with the old server controls
  • Data binding with @bind and the component lifecycle
  • Render modes: static SSR, Interactive Server, Interactive WebAssembly and Auto
  • Choosing the right render mode for each kind of page
  • Lab: build a quantity counter and a reusable product card component

Section 12: Lab: Forms and Data Grids with Blazor

  • EditForm, InputText, InputNumber and DataAnnotationsValidator
  • QuickGrid for displaying, sorting and paging data
  • Using EF Core safely in components with DbContextFactory
  • Keeping state across prerendering with [PersistentState] in .NET 10
  • Lab: an interactive order management page with Blazor

Section 13: User Accounts with ASP.NET Core Identity

  • How authentication differs from authorisation
  • Add ASP.NET Core Identity: registration, login and logout
  • Role-based and policy-based authorisation in Razor Pages and Blazor
  • An introduction to the passkey support in the .NET 10 Blazor Web App template
  • Lab: restrict the product management pages to administrators

Section 14: Lab: Deployment and Moving Away from Web Forms

  • Publish the app and configure the production environment
  • Deploy to IIS with the ASP.NET Core Hosting Bundle
  • Build a container image with Docker for a Linux server or the cloud
  • Migrating a Web Forms system step by step, and choosing between Razor Pages and Blazor
  • Lab: publish the workshop app and test it on the target machine

Section 15: Workshop: An End-to-End Online Store

  • Design the pages and database for an ordering system
  • A storefront with Razor Pages and a back office with Blazor
  • Add user accounts, administrator permissions and logging
  • Workshop: present the work, review the code together and plan next steps

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

Can ASP.NET Web Forms still be used, and what should replace it?

Existing Web Forms apps still run on .NET Framework 4.8, but Web Forms is no longer being developed and is not part of ASP.NET Core or modern .NET. New work should use ASP.NET Core. Razor Pages suits developers used to writing pages with code-behind, while Blazor suits those used to placing controls and handling events. Both use C# and can live in the same project, so an old system can be moved over piece by piece.

How do Razor Pages and Blazor differ, and which should I choose?

Razor Pages renders HTML on the server one page at a time, with a page model that handles GET and POST requests, which suits content-led sites and ordinary forms. Blazor builds the interface from reusable components and lets you choose a render mode: static, or interactive through the server or WebAssembly. It suits highly interactive screens such as back-office systems, so many applications use both together.

How does ASP.NET Core keep user state now that there is no ViewState?

HTTP does not remember anything between requests, so ASP.NET Core lets you choose by type of data. Form values come back through model binding, per-user data goes in session or cookies, one-off messages after a redirect use TempData, and shared data uses caching or services through dependency injection. Interactive Blazor components keep their state in the component while the user has the page open.

Who is the Basic ASP.NET Core with Razor Pages and Blazor course for, and what should I know beforehand?

It suits beginners who want to build web applications with ASP.NET Core, developers maintaining Web Forms systems who want to move to current .NET, IT managers, IT teams and students working on .NET projects. You should know basic HTML and C#, and understand databases and basic SQL. The course uses C# only, so if you come from VB.NET, review C# syntax first.

What will I be able to do after the Basic ASP.NET Core with Razor Pages and Blazor course?

You will be able to build web applications with ASP.NET Core 10 using both Razor Pages and Blazor, handle validated forms, manage data with EF Core 10 in CRUD pages with search and paging, structure the app with dependency injection and logging, add user accounts with Identity, deploy to IIS or Docker, and plan the migration of an existing Web Forms system. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Basic ASP.NET Core with Razor Pages and Blazor course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as using screens from a Web Forms system your team maintains as exercises for moving to Razor Pages or Blazor. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.

Related articles

Articles are published in Thai.