From the course: Blazor WebAssembly: Building Your First App
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Create a Razor component - Blazor Tutorial
From the course: Blazor WebAssembly: Building Your First App
Create a Razor component
- [Instructor] One of Blazor's core components is Razor components. A Razor component contains the UI for a certain part of a Blazor application. It can be used for UI display, as well as the processing logic and functionality for a mixture of HTML and C# markup. Razor component files have the extension name of .razor and can be used across different parts of the application. Their file name must start with a capital letter, and the file name will represent the ID of the component, minus the extension name. Looking at our Blazor application, I have a couple of Razor components already added. I have the main App.razor, alongside a couple of layout components. I know that they're Razor components as they have the .razor extension. However, I don't have any pages. Let's correct that. I right-click on the Pages folder, go to Add, and go to Razor Component. Throughout the rest of this course, I'm going to be creating an…
Contents
-
-
-
-
-
(Locked)
Create a Razor component4m 15s
-
(Locked)
Code blocks4m 7s
-
(Locked)
Parameters6m 23s
-
(Locked)
Other directives5m 50s
-
(Locked)
Data binding3m 34s
-
(Locked)
Event handling3m 55s
-
(Locked)
Built-in components5m 44s
-
(Locked)
Challenge: Basic web application4m 27s
-
(Locked)
Solution: Basic web application5m 27s
-
(Locked)
-