Search⌘ K
AI Features

Creating the Demo Blazor WebAssembly Project

Explore creating a Blazor WebAssembly demo project using the Visual Studio template. Understand how to set up Razor components, separate code with code-behind files, and run the app including its Home, Counter, and Fetch Data pages.

The Demo project that we are creating is based on one of the many sample projects that are provided by the Blazor WebAssembly App project template. After we have used the template to create the project, we will examine the files in the sample project and update some of the files to demonstrate how to use Razor components. Finally, we will separate the code block of one of the components into a separate file to demonstrate how to use the code-behind technique to separate the markup from the code.

Creating the Demo project

Visual Studio comes with quite a few project templates. We are going to use the Blazor WebAssembly App project template to create our first Blazor WebAssembly project. Since this project template can be used to create many different ...