Search⌘ K
AI Features

Adding the ExpenseEdit component

Explore adding the ExpenseEdit component in Blazor WebAssembly to enable users to add and edit expenses. Understand how to initialize components, handle form submissions, and implement validation with EditForm for a functional expense tracker.

We'll cover the following...

We need to add a component to enable us to add and edit expenses. We do this as follows:

  1. Return to Visual Studio.

  2. Open the ExpenseTracker.Client.Shared\NavMenu.razor page.

  3. Add the following markup to the ul element:

C++
<li class="nav-item px-3">
<NavLink class="nav-link" href="expense">
<span class="oi oi-home" aria-hidden="true"></span>
Add Expense
</NavLink>
</li>
    ...