From the course: Blazor WebAssembly: Building Your First App
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Data binding - Blazor Tutorial
From the course: Blazor WebAssembly: Building Your First App
Data binding
- [Instructor] Data binding allows you to automatically bind the value from either a text box or a dropdown list to a property in a Razor component. This can be controlled with an event. The property can be updated as you type or when you're finished typing, and it works the other way around. If you wish to set your property in the code snippet, say, when you click a button, it will automatically update it in the text box or dropdown list. With the application running and going into the product details page, I have the ability to add products to the shopping cart. If I add a quantity of one and go to the shopping cart page, I can see that it's been successfully added. However, if I go back and add three more and go back to the shopping cart page, I can see it's only added one additional item to the cart. It looks like the amount being entered into the quantity box is not binding to the amount that it's being added to the…
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)
-