Building an Expense Tracker Using the EditForm Component
Most applications require some data input by the user. The Blazor WebAssembly framework includes a component that makes it easy to create data input forms and validate the data on those forms.
In this chapter, we will learn how to use the EditForm component and the various built-in input components. We will also learn how to use the built-in input validation components in conjunction with Data Annotations to validate the data on the form. Finally, we will learn how to use the NavigationLock component to prevent users from losing their edits if they navigate away from the form before they have saved their updates.
The project that we’ll create in this chapter will be a travel expense tracker. We will use a multi-project architecture to separate the Blazor WebAssembly app from the ASP.NET Web API endpoints. The page used to add and edit expenses will use the EditForm
component as well as many of the built-in input...